@use '../../../../utils/map' as *;
@use '../../../../typography/functions' as *;

////
/// @package theming
/// @group schemas
/// @access public
////

// stylelint-disable max-line-length

/// Generates a base light tabs schema.
/// @type {Map}
/// @prop {Map} item-text-color [color: ('gray', 700)] - The color used for the tab text color.
/// @prop {Map} item-background [color: ('surface')] - The background color used for the tabs header.
/// @prop {Map} item-hover-background [color: ('gray', 200)] - The background used for the tabs on hover.
/// @prop {Map} item-hover-color [color: ('gray', 900)] - The text color used for the tabs on hover.
/// @prop {Map} item-icon-color [color: ('gray', 700)] - The color used for the tab icon.
/// @prop {Map} item-active-icon-color [color: ('primary', 500)] - The color used for the active tab icon.
/// @prop {Map} item-hover-icon-color [color: ('gray', 700)] - The color used for the tab icon on hover.
/// @prop {Map} item-disabled-icon-color [color: ('gray', 500)] - The color used for the disabled tab icon.
/// @prop {Map} item-active-color [color: ('primary', 500)] - The color used for the active tabs text.
/// @prop {Map} item-active-background [color: ('gray', 200)] - The color used for the active/focused tab background.
/// @prop {Map} item-disabled-color [color: ('gray', 500)] - The color used for the disabled tabs text.
/// @prop {Map} indicator-color [color: ('primary', 500)] - The color used for the active tab indicator.
/// @prop {Map} button-color [color: ('gray', 700)] - The color used for the button icon/text color.
/// @prop {Map} button-hover-color [color: ('gray', 900)] - The color used for the button icon/text color on hover.
/// @prop {Map} button-disabled-color [color: ('gray', 500)] - The color used for the disabled button icon/text.
/// @prop {Map} button-background [color: ('surface')] - The color used for the button background.
/// @prop {Map} button-hover-background [color: ('gray', 100)] - The color used for the button background on hover.
/// @prop {Color} border-color [transparent] - The color used for the tab items bottom border.
/// @prop {Color} border-color--hover [transparent] - The color used for the tab items bottom border on hover/focus.
/// @prop {Map} tab-ripple-color [color: ('gray', 100)] - The color used for the button background.
/// @prop {Map} button-ripple-color [color: ('gray', 100)] - The color used for the button background on hover.
/// @prop {List} border-radius [(rem(0), rem(0), rem(6px))] - The border radius used for tabs.
/// @prop {Map} typography [label: (value: 'button')] - The typography styles used for the component.
$light-tabs: (
    item-text-color: (
        color: (
            'gray',
            700,
        ),
    ),
    item-background: (
        color: (
            'surface',
        ),
    ),
    item-hover-background: (
        color: (
            'gray',
            200,
        ),
    ),
    item-hover-color: (
        color: (
            'gray',
            900,
        ),
    ),
    item-active-color: (
        color: (
            'primary',
            500,
        ),
    ),
    item-icon-color: (
        color: (
            'gray',
            700,
        ),
    ),
    item-active-icon-color: (
        color: (
            'primary',
            500,
        ),
    ),
    item-hover-icon-color: (
        color: (
            'gray',
            700,
        ),
    ),
    item-disabled-icon-color: (
        color: (
            'gray',
            500,
        ),
    ),
    item-active-background: (
        color: (
            'gray',
            200,
        ),
    ),
    item-disabled-color: (
        color: (
            'gray',
            500,
        ),
    ),
    indicator-color: (
        color: (
            'primary',
            500,
        ),
    ),
    button-color: (
        color: (
            'gray',
            700,
        ),
    ),
    button-background: (
        color: (
            'surface',
        ),
    ),
    button-hover-background: (
        color: (
            'gray',
            100,
        ),
    ),
    button-hover-color: (
        color: (
            'gray',
            900,
        ),
    ),
    button-disabled-color: (
        color: (
            'gray',
            500,
        ),
    ),
    tab-ripple-color: (
        color: (
            'gray',
            100,
        ),
    ),
    button-ripple-color: (
        color: (
            'gray',
            100,
        ),
    ),
    border-color: transparent,
    border-color--hover: transparent,
    border-radius: (
        border-radius: (
            rem(0),
            rem(0),
            rem(6px),
        ),
    ),
    typography: (
        label: (
            value: 'button',
        ),
    ),
);

/// Generates a material tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-color [color: ('gray', 700)] - The text color used for the tabs on hover.
/// @requires {Map} $light-tabs
$material-tabs: extend(
    $light-tabs,
    (
        item-hover-color: (
            color: (
                'gray',
                700,
            ),
        ),
        _meta: (
            theme: 'material',
            variant: 'light',
        ),
    )
);

/// Generates a fluent tabs schema.
/// @type {Map}
/// @prop {Map} item-text-color [color: ('gray', 800)] - The color used for the tab text color.
/// @prop {Map} button-color [color: ('gray', 500)] - The color used for the button icon/text color.
/// @prop {Map} button-hover-color [color: ('gray', 600)] - The color used for the button icon/text color on hover.
/// @prop {Map} button-disabled-color [color: ('gray', 400)] - The color used for the disabled button icon/text.
/// @prop {Map} item-active-color [color: ('gray', 800)] - The color used for the active tabs text.
/// @prop {Map} item-active-icon-color [color: ('gray', 800)] - The color used for the active tab icon.
/// @prop {Map} item-hover-icon-color [color: ('gray', 900)] - The color used for the tab icon on hover.
/// @prop {Map} item-icon-color [color: ('gray', 800)] - The color used for the tab icon.
/// @prop {Map} typography [label: (value: 'body-2')] - The typography styles used for the component.
/// @requires {Map} $light-tabs
$fluent-tabs: extend(
    $light-tabs,
    (
        item-text-color: (
            color: (
                'gray',
                800,
            ),
        ),
        button-color: (
            color: (
                'gray',
                500,
            ),
        ),
        button-hover-color: (
            color: (
                'gray',
                600,
            ),
        ),
        button-disabled-color: (
            color: (
                'gray',
                400,
            ),
        ),
        item-active-color: (
            color: (
                'gray',
                800,
            ),
        ),
        item-active-icon-color: (
            color: (
                'gray',
                800,
            ),
        ),
        item-hover-icon-color: (
            color: (
                'gray',
                900,
            ),
        ),
        item-icon-color: (
            color: (
                'gray',
                800,
            ),
        ),
        typography: (
            label: (
                value: 'body-2',
            ),
        ),
        _meta: (
            theme: 'fluent',
            variant: 'light',
        ),
    )
);

/// Generates a bootstrap tabs schema.
/// @type {Map}
/// @prop {map} item-text-color [color: ('primary', 500)] - The color used for the tab text color.
/// @prop {map} item-icon-color [color: ('primary', 500)] - The color used for the tab icon.
/// @prop {map} item-hover-color [color: ('primary', 700)] - The text color used for the tabs on hover.
/// @prop {Map} item-hover-icon-color [color: ('primary', 700)] - The color used for the tab icon on hover.
/// @prop {map} item-active-color [color: ('gray', 800)] - The color used for the active tabs text.
/// @prop {map} item-active-icon-color [color: ('gray', 800)] - The color used for the active tabs icon.
/// @prop {Map} item-disabled-color [color: ('primary', 500, .5)] - The color used for the disabled tabs text.
/// @prop {Map} item-disabled-icon-color [color: ('primary', 500, .5)] - The color used for the disabled tab icon.
/// @prop {Map} button-color [color: ('primary', 500)] - The color used for the button icon/text color.
/// @prop {Map} button-hover-color [color: ('primary', 500)] - The color used for the button icon/text color on hover.
/// @prop {Map} button-disabled-color [color: ('primary', 500, .5)] - The color used for the disabled button icon/text.
/// @prop {map} item-hover-background [color: ('surface')] - The background used for the tabs on hover.
/// @prop {map} item-active-background [color: ('surface')] - The color used for the active/focused tab background.
/// @prop {map} border-color [color: ('gray', 300)] - The color used for the tab items border.
/// @prop {map} border-color--hover [color: ('gray', 200)] - The color used for the tab items border on hover/focus.
/// @prop {List} border-radius [(rem(4px), rem(0), rem(6px))] - The border radius used for tabs.
/// @requires {Map} $light-tabs
$bootstrap-tabs: extend(
    $light-tabs,
    (
        button-color: (
            color: (
                'primary',
                500,
            ),
        ),
        button-hover-color: (
            color: (
                'primary',
                500,
            ),
        ),
        item-hover-background: (
            color: (
                'surface',
            ),
        ),
        button-disabled-color: (
            color: (
                'primary',
                500,
                0.5,
            ),
        ),
        item-active-background: (
            color: (
                'surface',
            ),
        ),
        border-color: (
            color: (
                'gray',
                300,
            ),
        ),
        border-color--hover: (
            color: (
                'gray',
                200,
            ),
        ),
        item-text-color: (
            color: (
                'primary',
                500,
            ),
        ),
        item-icon-color: (
            color: (
                'primary',
                500,
            ),
        ),
        item-hover-color: (
            color: (
                'primary',
                700,
            ),
        ),
        item-hover-icon-color: (
            color: (
                'primary',
                700,
            ),
        ),
        item-active-color: (
            color: (
                'gray',
                800,
            ),
        ),
        item-active-icon-color: (
            color: (
                'gray',
                800,
            ),
        ),
        item-disabled-color: (
            color: (
                'primary',
                500,
                0.5,
            ),
        ),
        item-disabled-icon-color: (
            color: (
                'primary',
                500,
                0.5,
            ),
        ),
        border-radius: (
            border-radius: (
                rem(4px),
                rem(0),
                rem(6px),
            ),
        ),
        _meta: (
            theme: 'bootstrap',
            variant: 'light',
        ),
    )
);

/// Generates an indigo tabs schema.
/// @type {Map}
/// @prop {Color} item-background [transparent] - The background color used for the tabs header.
/// @prop {Map} item-hover-background [color: ('gray', 900, .05)] - The background used for the tabs on hover.
/// @prop {Color} item-active-background [transparent] - The color used for the active/focused tab background.
/// @prop {Map} item-text-color [color: ('gray', 800)] - The color used for the tab text color.
/// @prop {Map} item-active-color [color: ('gray', 900)] - The color used for the active tabs text.
/// @prop {Map} item-disabled-color [color: ('gray', 900, .2)] - The color used for the disabled tabs text.
/// @prop {Map} item-icon-color [color: ('gray', 600)] - The color used for the tab icon.
/// @prop {Map} item-active-icon-color [color: ('gray', 700)] - The color used for the active tab icon.
/// @prop {Map} item-disabled-icon-color [color: ('gray', 900, .2)] - The color used for the disabled tab icon.
/// @prop {Map} indicator-color [color: ('primary', 400)] - The color used for the tabs borders.
/// @prop {Map} border-color [color: ('gray', 900, .15)] - The color used for the tab items bottom border.
/// @prop {Map} border-color--hover [color: ('gray', 900, .15)] - The color used for the tab items bottom border on hover/focus.
/// @prop {Color} button-background [transparent] - The color used for the button background.
/// @prop {Map} button-hover-background [color: ('gray', 900, .05)] - The color used for the button background on hover.
/// @prop {Map} button-color [color: ('gray', 600)] - The color used for the button icon/text color.
/// @prop {Map} button-hover-color [color: ('gray', 700)] - The color used for the button icon/text color on hover.
/// @prop {Map} button-disabled-color [color: ('gray', 900, .2)] - The color used for the disabled button icon/text.
/// @prop {Map} typography [label: (value: 'subtitle-2')] - The typography styles used for the component.
/// @requires {Map} $light-tabs
$indigo-tabs: extend(
    $light-tabs,
    (
        item-background: transparent,
        item-hover-background: (
            color: (
                'gray',
                900,
                0.05,
            ),
        ),
        item-active-background: transparent,
        item-text-color: (
            color: (
                'gray',
                800,
            ),
        ),
        item-active-color: (
            color: (
                'gray',
                900,
            ),
        ),
        item-disabled-color: (
            color: (
                'gray',
                900,
                0.2,
            ),
        ),
        item-icon-color: (
            color: (
                'gray',
                600,
            ),
        ),
        item-active-icon-color: (
            color: (
                'gray',
                700,
            ),
        ),
        item-disabled-icon-color: (
            color: (
                'gray',
                900,
                0.2,
            ),
        ),
        indicator-color: (
            color: (
                'primary',
                400,
            ),
        ),
        border-color: (
            color: (
                'gray',
                900,
                0.15,
            ),
        ),
        border-color--hover: (
            color: (
                'gray',
                900,
                0.15,
            ),
        ),
        button-background: transparent,
        button-hover-background: (
            color: (
                'gray',
                900,
                0.05,
            ),
        ),
        button-color: (
            color: (
                'gray',
                600,
            ),
        ),
        button-hover-color: (
            color: (
                'gray',
                700,
            ),
        ),
        button-disabled-color: (
            color: (
                'gray',
                900,
                0.2,
            ),
        ),
        typography: (
            label: (
                value: 'subtitle-2',
            ),
        ),
        _meta: (
            theme: 'indigo',
            variant: 'light',
        ),
    )
);
