| | | 1 | | namespace Allyaria.Theming.BrandTypes; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Represents a brand configuration that encapsulates the font and theme variants (light and dark) used for visual styl |
| | | 5 | | /// in the Allyaria Theming system. |
| | | 6 | | /// </summary> |
| | | 7 | | public sealed record Brand |
| | | 8 | | { |
| | | 9 | | /// <summary> |
| | | 10 | | /// Initializes a new instance of the <see cref="Brand" /> struct with optional font and light/dark theme parameters |
| | | 11 | | /// </summary> |
| | | 12 | | /// <param name="font">The font configuration for the brand. Defaults to a new <see cref="BrandFont" /> if null.</pa |
| | | 13 | | /// <param name="lightTheme">The light theme configuration for the brand. Defaults to null if unspecified.</param> |
| | | 14 | | /// <param name="darkTheme">The dark theme configuration for the brand. Defaults to null if unspecified.</param> |
| | 148 | 15 | | public Brand(BrandFont? font = null, BrandTheme? lightTheme = null, BrandTheme? darkTheme = null) |
| | | 16 | | { |
| | 148 | 17 | | Font = font ?? new BrandFont(); |
| | 148 | 18 | | Variant = new BrandVariant(lightTheme: lightTheme, darkTheme: darkTheme); |
| | 148 | 19 | | } |
| | | 20 | | |
| | | 21 | | /// <summary>Gets the font configuration associated with this brand.</summary> |
| | 27 | 22 | | public BrandFont Font { get; } |
| | | 23 | | |
| | | 24 | | /// <summary>Gets the light and dark theme variants for this brand.</summary> |
| | 805 | 25 | | public BrandVariant Variant { get; } |
| | | 26 | | |
| | | 27 | | /// <summary>Creates a predefined <see cref="Brand" /> instance configured for high contrast accessibility.</summary |
| | | 28 | | /// <returns> |
| | | 29 | | /// A <see cref="Brand" /> instance with high-contrast surface, primary, secondary, tertiary, and status colors for |
| | | 30 | | /// light and dark modes. |
| | | 31 | | /// </returns> |
| | | 32 | | public static Brand CreateHighContrastBrand() |
| | 73 | 33 | | => new( |
| | 73 | 34 | | font: new BrandFont(), |
| | 73 | 35 | | lightTheme: new BrandTheme( |
| | 73 | 36 | | surface: StyleDefaults.HighContrastSurfaceColorLight, |
| | 73 | 37 | | primary: StyleDefaults.HighContrastPrimaryColorLight, |
| | 73 | 38 | | secondary: StyleDefaults.HighContrastSecondaryColorLight, |
| | 73 | 39 | | tertiary: StyleDefaults.HighContrastTertiaryColorLight, |
| | 73 | 40 | | error: StyleDefaults.HighContrastErrorColorLight, |
| | 73 | 41 | | warning: StyleDefaults.HighContrastWarningColorLight, |
| | 73 | 42 | | success: StyleDefaults.HighContrastSuccessColorLight, |
| | 73 | 43 | | info: StyleDefaults.HighContrastInfoColorLight |
| | 73 | 44 | | ), |
| | 73 | 45 | | darkTheme: new BrandTheme( |
| | 73 | 46 | | surface: StyleDefaults.HighContrastSurfaceColorDark, |
| | 73 | 47 | | primary: StyleDefaults.HighContrastPrimaryColorDark, |
| | 73 | 48 | | secondary: StyleDefaults.HighContrastSecondaryColorDark, |
| | 73 | 49 | | tertiary: StyleDefaults.HighContrastTertiaryColorDark, |
| | 73 | 50 | | error: StyleDefaults.HighContrastErrorColorDark, |
| | 73 | 51 | | warning: StyleDefaults.HighContrastWarningColorDark, |
| | 73 | 52 | | success: StyleDefaults.HighContrastSuccessColorDark, |
| | 73 | 53 | | info: StyleDefaults.HighContrastInfoColorDark |
| | 73 | 54 | | ) |
| | 73 | 55 | | ); |
| | | 56 | | } |