1using System.Text.Json.Serialization;
33 public WeddingLayoutMode
LayoutMode {
get;
set; } = WeddingLayoutMode.WebPage;
60 public List<StoryChapter>
StoryChapters {
get;
set; } = WeddingStoryChapterDefaults.Create();
70 WeddingSectionOrderCatalog.InvitationRecommendedOrder.ToList();
183 public HeroPanelPlacement(
string desktopVertical,
string desktopHorizontal,
string mobileVertical,
string mobileHorizontal)
302 public static IReadOnlyList<WeddingThemeOption>
Themes => WeddingThemeCatalog.Options;
312 public static IReadOnlyList<WeddingLayoutOption>
Layouts => WeddingLayoutCatalog.Options;
338 public static WeddingLayoutOption
GetLayout(WeddingLayoutMode mode) =>
339 WeddingLayoutCatalog.Instance.Find(mode) ?? WeddingLayoutCatalog.Options[0];
365 public static WeddingThemeOption
GetTheme(
string? key) =>
366 WeddingThemeCatalog.Instance.Find(key) ?? WeddingThemeCatalog.Options[0];
391 config.DesignSettings.MusicButtonPlacement ??=
new WeddingFloatingPosition();
393 config.UnlockedLayoutModes ??=
new();
394 config.UnlockedThemeKeys ??=
new();
397 ? config.DesignSettings.ThemeKey
399 config.DesignSettings.ThemeKey = WeddingThemeCatalog.NormalizeKey(themeKey);
404 config.DesignSettings.SectionOrder = WeddingSectionOrderCatalog.NormalizeInvitationOrder(
407 config.DesignSettings.SectionVisibility ??=
new Dictionary<string, bool>();
450 if (mode != WeddingLayoutMode.Unknown && WeddingLayoutCatalog.Instance.Exists(mode))
483 WeddingLayoutCatalog.FromLegacyKey(key);
510 WeddingLayoutCatalog.ToLegacyKey(mode);
567 config.InviteHeroTopHorizontalDesktop = placement.InviteTop.DesktopHorizontal;
568 config.InviteHeroTopVerticalMobile = placement.InviteTop.MobileVertical;
569 config.InviteHeroTopHorizontalMobile = placement.InviteTop.MobileHorizontal;
570 config.InviteHeroBottomVerticalDesktop = placement.InviteBottom.DesktopVertical;
571 config.InviteHeroBottomHorizontalDesktop = placement.InviteBottom.DesktopHorizontal;
572 config.InviteHeroBottomVerticalMobile = placement.InviteBottom.MobileVertical;
573 config.InviteHeroBottomHorizontalMobile = placement.InviteBottom.MobileHorizontal;
574 config.HeroPanelVerticalDesktop = placement.ThankYou.DesktopVertical;
575 config.HeroPanelHorizontalDesktop = placement.ThankYou.DesktopHorizontal;
576 config.HeroPanelVerticalMobile = placement.ThankYou.MobileVertical;
577 config.HeroPanelHorizontalMobile = placement.ThankYou.MobileHorizontal;
645 string.IsNullOrWhiteSpace(preferred) ? fallback : preferred;
687 private static string NormalizeOption(
string? value,
string[] allowed,
string fallback)
689 var normalized = value?.Trim().ToLowerInvariant();
690 return !
string.IsNullOrWhiteSpace(normalized) && allowed.Contains(normalized) ? normalized : fallback;
HeroPlacement HeroPlacement
WeddingLayoutMode LayoutMode
List< StoryChapter > StoryChapters
WeddingFloatingPosition MusicButtonPlacement
Dictionary< string, bool > SectionVisibility
List< string > SectionOrder
HeroPanelPlacement InviteTop
HeroPanelPlacement ThankYou
HeroPanelPlacement InviteBottom
bool HasMobileCustomPosition
HeroPanelPlacement(string desktopVertical, string desktopHorizontal, string mobileVertical, string mobileHorizontal)
bool HasDesktopCustomPosition
static void NormalizePlacement(HeroPanelPlacement placement, string verticalFallback)
static IReadOnlyList< WeddingThemeOption > Themes
static WeddingLayoutMode FromLegacyLayoutKey(string? key)
static string ToLegacyLayoutKey(WeddingLayoutMode mode)
static string FirstNonBlank(string? preferred, string fallback)
static WeddingThemeOption GetTheme(string? key)
static WeddingLayoutMode ResolveLayoutMode(WeddingLayoutMode mode, string? legacyStyle)
static void Normalize(TenantConfig config)
static void SyncLegacyFromPlacement(TenantConfig config)
static IReadOnlyList< WeddingLayoutOption > Layouts
static string NormalizeOption(string? value, string[] allowed, string fallback)
static WeddingLayoutOption GetLayout(WeddingLayoutMode mode)
static void SyncPlacementFromLegacy(TenantConfig config)
string InviteHeroTopVerticalMobile
string InviteHeroTopHorizontalDesktop
string HeroPanelVerticalDesktop
string HeroPanelHorizontalDesktop
string InviteHeroTopHorizontalMobile
string InviteHeroBottomHorizontalMobile
DesignSettings DesignSettings
string InviteHeroBottomVerticalMobile
string HeroPanelHorizontalMobile
string HeroPanelVerticalMobile
string InviteHeroTopVerticalDesktop
string InviteHeroBottomVerticalDesktop
string InviteHeroBottomHorizontalDesktop