#include "LightTheme.h"

#include "ColorPalette.h"

const std::unordered_map<Theme::Sys::Color, Theme::Ref::Color> LightTheme::mPalette = {
    {Theme::Sys::Color::Primary, Theme::Ref::Color::Primary_40},
    {Theme::Sys::Color::Primary_Container, Theme::Ref::Color::Primary_90},
    {Theme::Sys::Color::Secondary, Theme::Ref::Color::Secondary_40},
    {Theme::Sys::Color::Secondary_Container, Theme::Ref::Color::Secondary_90},
    {Theme::Sys::Color::Tertiary, Theme::Ref::Color::Tertiary_40},
    {Theme::Sys::Color::Tertiary_Container, Theme::Ref::Color::Tertiary_90},
    {Theme::Sys::Color::Surface, Theme::Ref::Color::Neutral_99},
    {Theme::Sys::Color::Surface_Variant, Theme::Ref::Color::Neutral_Variant_90},
    {Theme::Sys::Color::Background, Theme::Ref::Color::Neutral_99},
    {Theme::Sys::Color::Error, Theme::Ref::Color::Error_40},
    {Theme::Sys::Color::Error_Container, Theme::Ref::Color::Error_90},
    {Theme::Sys::Color::On_Primary, Theme::Ref::Color::Primary_100},
    {Theme::Sys::Color::On_Primary_Container, Theme::Ref::Color::Primary_10},
    {Theme::Sys::Color::On_Secondary, Theme::Ref::Color::Secondary_100},
    {Theme::Sys::Color::On_Secondary_Container, Theme::Ref::Color::Secondary_10},
    {Theme::Sys::Color::On_Tertiary, Theme::Ref::Color::Tertiary_100},
    {Theme::Sys::Color::On_Tertiary_Container, Theme::Ref::Color::Tertiary_10},
    {Theme::Sys::Color::On_Surface, Theme::Ref::Color::Neutral_10},
    {Theme::Sys::Color::On_Surface_Variant, Theme::Ref::Color::Neutral_Variant_30},
    {Theme::Sys::Color::On_Error, Theme::Ref::Color::Error_100},
    {Theme::Sys::Color::On_Error_Container, Theme::Ref::Color::Error_10},
    {Theme::Sys::Color::On_Background, Theme::Ref::Color::Neutral_10},
    {Theme::Sys::Color::Outline, Theme::Ref::Color::Neutral_Variant_50},
    {Theme::Sys::Color::Ouline_Variant, Theme::Ref::Color::Neutral_Variant_80},
    {Theme::Sys::Color::Shadow, Theme::Ref::Color::Neutral_0},
    {Theme::Sys::Color::Surface_Tint_Color, Theme::Ref::Color::Primary_40},
    {Theme::Sys::Color::Inverse_Surface, Theme::Ref::Color::Neutral_20},
    {Theme::Sys::Color::Inverse_On_Surface, Theme::Ref::Color::Neutral_95},
    {Theme::Sys::Color::Inverse_Primary, Theme::Ref::Color::Primary_80},
    {Theme::Sys::Color::Scrim, Theme::Ref::Color::Neutral_0},
};

Color LightTheme::getColor(Theme::Sys::Color token) const
{
    if (auto iter = mPalette.find(token); iter != mPalette.end())
    {
        return ColorPalette::getColor(iter->second);
    }
    else
    {
        return Color();
    }
}