using GB5Shared.DTO.Framework.Login; namespace GB5Shared.Export { /// /// Per-export color/font theme, shared by every report-export format (Excel, native PDF). Sourced /// from 's partner/white-label branding fields (already resolved at login from /// TPARTNERBRAND/TPARTNERPRODUCTBRAND — no extra query needed here), which already default to a /// fixed professional blue/Inter when no partner brand is configured for the client. /// public sealed class ReportTheme { public string PrimaryColorHex { get; init; } = "#1F4E78"; public string AccentColorHex { get; init; } = "#2E75B6"; public string FontFamily { get; init; } = "Calibri"; public static ReportTheme FromLogin(LoginDTO? login) { var fallback = new ReportTheme(); if (login == null) return fallback; return new ReportTheme { PrimaryColorHex = string.IsNullOrWhiteSpace(login.PrimaryColor) ? fallback.PrimaryColorHex : login.PrimaryColor, AccentColorHex = string.IsNullOrWhiteSpace(login.AccentColor) ? fallback.AccentColorHex : login.AccentColor, FontFamily = string.IsNullOrWhiteSpace(login.FontFamily) ? fallback.FontFamily : login.FontFamily, }; } } }