#pragma once

#include "ITheme.h"
#include "FontTokens.h"
#include "ElevationTokens.h"

#include <map>

class ButtonData
{
public:
    enum class State
    {
        Enabled,
        Disabled,
        Hovered,
        Focused,
        Pressed
    };

    enum class Component
    {
        Elevated,
        Filled,
        Filled_Tonal,
        Outlined,
        Text,
        Icon,
        Segmented,
        Floating_Action,
        Extended_Floating_Action
    };

    enum class LabelTextAlign
    {
        Centre
    };

    Theme::Sys::Color getContainerColor() const;
    Theme::Sys::Color getContainerShadowColor() const;
    Theme::Sys::Color getContainerSurfaceTintColor() const;
    Theme::Sys::Elevation getContainerElevation() const;
    float getStateLayerOverlayOpacity() const;

    Theme::Sys::Color getLabelTextColor() const;
    Theme::Sys::Typescale getLabelTypescale() const;
    float getLabelOpacity() const;

    bool canHaveIcon() const;
    Theme::Sys::Color getIconColor() const;

    unsigned getContainerHeight() const;
    unsigned getContainerCornerRadius() const;

    unsigned getIconSize() const;

    unsigned getLeftRightPadding() const;
    unsigned getLeftPaddingWithIcon() const;
    unsigned getRightPaddingWithIcon() const;

    unsigned getBetweenElementPadding() const;

    LabelTextAlign getLabelTextAlign() const;

    State mState{ State::Enabled };
    Component mComponent{ Component::Elevated };

private:
    using ComponentState = std::pair<Component, State>;

    static const std::map<ComponentState, Theme::Sys::Color> mContainerColors;
    static const std::map<ComponentState, Theme::Sys::Color> mContainerShadowColors;
    static const std::map<ComponentState, Theme::Sys::Elevation> mContainerElevations;
    static const std::map<ComponentState, float> mContainerOpacity;

    static const std::map<ComponentState, Theme::Sys::Color> mLabelTextColors;
    static const std::map<ComponentState, Theme::Sys::Typescale> mLabelTypescales;
    static const std::map<ComponentState, float> mLabelTextOpacity;

    static const std::map<ComponentState, Theme::Sys::Color> mIconColors;
    static const std::map<ComponentState, float> mIconOpacity;

    static const Theme::Sys::Color DEFAULT_CONTAINER_COLOR{ Theme::Sys::Color::None };
    static const Theme::Sys::Color DEFAULT_CONTAINER_SHADOW_COLOR{ Theme::Sys::Color::None };
    static const Theme::Sys::Elevation DEFAULT_CONTAINER_ELEVATION{ Theme::Sys::Elevation::Level_0 };
    static const float DEFAULT_CONTAINER_OPACITY;
};