using MudBlazor;

namespace QuantEngine.Web.Client.Theme;

public static class AppTheme
{
    public static MudTheme LightTheme => new()
    {
        PaletteLight = new PaletteLight
        {
            Primary = "#3f51b5",
            Secondary = "#f50057",
            Success = "#4caf50",
            Warning = "#ff9800",
            Error = "#f44336",
            Info = "#2196f3",
            Dark = "#121212",
            Background = "#fafafa",
            Surface = "#ffffff",
            TextPrimary = "#212121",
            TextSecondary = "rgba(0,0,0,0.6)",
            DrawerBackground = "#ffffff",
            DrawerText = "#212121",
            AppbarBackground = "#3f51b5",
            AppbarText = "#ffffff",
            ActionDefault = "#c0c0c0",
            ActionDisabled = "#f5f5f5",
            ActionDisabledBackground = "rgba(0,0,0,0.12)",
            Divider = "#e0e0e0",
            DividerLight = "#f5f5f5",
            TableLines = "#e0e0e0",
            LinesDefault = "#e0e0e0",
            LinesInputs = "#bdbdbd",
            TextDisabled = "rgba(0,0,0,0.38)"
        },
        Typography = new Typography
        {
            Default = new DefaultTypography
            {
                FontFamily = new[] { "Roboto", "sans-serif" },
                FontSize = "1rem",
                FontWeight = "400",
                LineHeight = "1.5",
                LetterSpacing = "0.5px"
            },
            H1 = new H1Typography
            {
                FontSize = "6rem",
                FontWeight = "300",
                LineHeight = "1.167",
                LetterSpacing = "-0.015625em"
            },
            H2 = new H2Typography
            {
                FontSize = "3.75rem",
                FontWeight = "300",
                LineHeight = "1.2",
                LetterSpacing = "-0.0083333333em"
            },
            H3 = new H3Typography
            {
                FontSize = "3rem",
                FontWeight = "400",
                LineHeight = "1.167",
                LetterSpacing = "0em"
            },
            H4 = new H4Typography
            {
                FontSize = "2.125rem",
                FontWeight = "500",
                LineHeight = "1.235",
                LetterSpacing = "0.0125em"
            },
            H5 = new H5Typography
            {
                FontSize = "1.5rem",
                FontWeight = "500",
                LineHeight = "1.334",
                LetterSpacing = "0em"
            },
            H6 = new H6Typography
            {
                FontSize = "1.25rem",
                FontWeight = "600",
                LineHeight = "1.6",
                LetterSpacing = "0.0125em"
            },
            Body1 = new Body1Typography
            {
                FontSize = "1rem",
                FontWeight = "500",
                LineHeight = "1.5",
                LetterSpacing = "0.03125em"
            },
            Body2 = new Body2Typography
            {
                FontSize = "0.875rem",
                FontWeight = "400",
                LineHeight = "1.43",
                LetterSpacing = "0.0178571429em"
            },
            Button = new ButtonTypography
            {
                FontSize = "0.875rem",
                FontWeight = "600",
                LineHeight = "1.75",
                LetterSpacing = "0.0892857143em"
            },
            Caption = new CaptionTypography
            {
                FontSize = "0.75rem",
                FontWeight = "400",
                LineHeight = "1.66",
                LetterSpacing = "0.0333333333em"
            }
        },
        LayoutProperties = new LayoutProperties
        {
            DefaultBorderRadius = "4px",
            DrawerWidthLeft = "256px",
            DrawerWidthRight = "256px",
            AppbarHeight = "64px",
        }
    };

    public static MudTheme DarkTheme => new()
    {
        PaletteDark = new PaletteDark
        {
            Primary = "#bb86fc",
            Secondary = "#03dac6",
            Success = "#4caf50",
            Warning = "#ff9800",
            Error = "#cf6679",
            Info = "#2196f3",
            Dark = "#121212",
            Background = "#121212",
            Surface = "#1e1e1e",
            TextPrimary = "#ffffff",
            TextSecondary = "rgba(255,255,255,0.7)",
            DrawerBackground = "#1e1e1e",
            DrawerText = "#ffffff",
            AppbarBackground = "#1f1f1f",
            AppbarText = "#ffffff",
            ActionDefault = "#3f3f3f",
            ActionDisabled = "#1e1e1e",
            ActionDisabledBackground = "rgba(255,255,255,0.12)",
            Divider = "#37474f",
            DividerLight = "#2c3e50",
            TableLines = "#37474f",
            LinesDefault = "#37474f",
            LinesInputs = "#555555",
            TextDisabled = "rgba(255,255,255,0.38)"
        },
        Typography = LightTheme.Typography,
        LayoutProperties = LightTheme.LayoutProperties
    };
}
