module Config.Style.Colour.Types exposing
    ( ColourScheme
    , Theme(..)
    , themeFromString
    , themeToString
    )

import Element exposing (Color)
import Json.Decode as D
import Json.Encode as E


type alias ColourScheme =
    { -- Core brand colors
      primary : Color
    , secondary : Color

    -- Surface colors
    , background : Color
    , surface : Color
    , surfaceVariant : Color

    -- Text colors
    , onPrimary : Color
    , onSecondary : Color
    , onBackground : Color
    , onSurface : Color

    -- Special purpose
    , shadow : Color
    , overlay : Color
    , border : Color
    , focus : Color
    , transparent : Color
    }


type Theme
    = Light
    | Dark


themeToString : Theme -> String
themeToString theme =
    case theme of
        Light ->
            "light"

        Dark ->
            "dark"


themeFromString : String -> Theme
themeFromString str =
    case str of
        "dark" ->
            Dark

        _ ->
            Light
