using System.ComponentModel;

namespace JSMR.UI.Blazor.Enums;

public enum ColorVarient
{
    Surface,
    SurfaceContainer,
    SurfaceContainerHigh,
    SurfaceContainerLow,
    SurfaceContainerOutline,
    SurfaceContainerOutlineHigh,
    SurfaceContainerOutlineLow,
    Primary,
    Secondary,
    Black,
    Yellow,
    Green,
    Mint,
    Teal,
    Blue,
    Orange,
    Pink,
    Red
}

public static class CssUtil
{
    public static string ToClassName(this ColorVarient colorVarient) => colorVarient switch
    {
        ColorVarient.Surface => "surface",
        ColorVarient.SurfaceContainer => "surface-container",
        ColorVarient.SurfaceContainerHigh => "surface-container-high",
        ColorVarient.SurfaceContainerLow => "surface-container-low",
        ColorVarient.SurfaceContainerOutline => "surface-container-outline",
        ColorVarient.SurfaceContainerOutlineHigh => "surface-container-outline-high",
        ColorVarient.SurfaceContainerOutlineLow => "surface-container-outline-low",
        ColorVarient.Yellow => "text-yellow",
        ColorVarient.Green => "text-green",
        ColorVarient.Mint => "text-mint",
        ColorVarient.Teal => "text-teal",
        ColorVarient.Blue => "text-blue",
        ColorVarient.Orange => "text-orange",
        ColorVarient.Pink => "text-pink",
        _ => ""
    };

    public static string TextClass(ColorVarient colorVarient) => colorVarient switch
    {
        ColorVarient.Surface => "surface",
        ColorVarient.SurfaceContainer => "surface-container",
        ColorVarient.SurfaceContainerHigh => "surface-container-high",
        ColorVarient.SurfaceContainerLow => "surface-container-low",
        ColorVarient.Yellow => "text-yellow",
        ColorVarient.Green => "text-green",
        ColorVarient.Mint => "text-mint",
        ColorVarient.Teal => "text-teal",
        ColorVarient.Blue => "text-blue",
        ColorVarient.Orange => "text-orange",
        ColorVarient.Pink => "text-pink",
        _ => ""
    };

    //public static string TextClass(ColorVarient colorVarient) => colorVarient switch
    //{
    //    ColorVarient.Primary => "text-primary",
    //    ColorVarient.Secondary => "text-secondary",
    //    ColorVarient.Black => "text-black",
    //    ColorVarient.Yellow => "text-yellow",
    //    ColorVarient.Green => "text-green",
    //    ColorVarient.Teal => "text-teal",
    //    ColorVarient.Blue => "text-blue",
    //    ColorVarient.Orange => "text-orange",
    //    ColorVarient.Pink => "text-pink",
    //    _ => ""
    //};

    //public static string BgClass(ColorVarient v) => /* similar */;
}