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

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

// stylelint-disable max-line-length

/// Generates a base dark tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [color: ('gray', 100, .5)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 100, .5)] - The color used for the active/focused tab background.
$base-dark-tabs: (
    item-hover-background: (
        color: (
            'gray',
            100,
            0.5,
        ),
    ),
    item-active-background: (
        color: (
            'gray',
            100,
            0.5,
        ),
    ),
);

/// Generates a dark material tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [color: ('gray', 100)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 100)] - The color used for the active/focused tab background.
/// @requires $material-tabs
/// @requires $base-dark-tabs
$dark-material-tabs: extend(
    $material-tabs,
    (
        item-hover-background: (
            color: (
                'gray',
                100,
            ),
        ),
        item-active-background: (
            color: (
                'gray',
                100,
            ),
        ),
        _meta: (
            theme: 'material',
            variant: 'dark',
        ),
    )
);

/// Generates a dark fluent tabs schema.
/// @prop {Map} item-disabled-color [color: ('gray', 300)] - The color used for the disabled tabs text.
/// @prop {Map} item-disabled-icon-color [color: ('gray', 300)] - The color used for the disabled tab icon.
/// @prop {Map} item-hover-background [color: ('gray', 50)] - The background used for the tabs on hover.
/// @prop {Map} item-active-background [color: ('gray', 50)] - The color used for the active/focused tab background.
/// @prop {Map} button-disabled-color [color: ('gray', 200)] - The color used for the disabled button icon/text.
/// @prop {Map} indicator-color [color: ('primary', 300)] - The color used for the active tab indicator.
/// @type {Map}
/// @requires $fluent-tabs
/// @requires $base-dark-tabs
$dark-fluent-tabs: extend(
    $fluent-tabs,
    $base-dark-tabs,
    (
        item-disabled-color: (
            color: (
                'gray',
                300,
            ),
        ),
        item-disabled-icon-color: (
            color: (
                'gray',
                300,
            ),
        ),

        item-hover-background: (
            color: (
                'gray',
                50,
            ),
        ),
        item-active-background: (
            color: (
                'gray',
                50,
            ),
        ),
        button-disabled-color: (
            color: (
                'gray',
                200,
            ),
        ),
        indicator-color: (
            color: (
                'primary',
                300,
            ),
        ),
        _meta: (
            theme: 'fluent',
            variant: 'dark',
        ),
    )
);

/// Generates a dark bootstrap tabs schema.
/// @type {Map}
/// @requires $bootstrap-tabs
$dark-bootstrap-tabs: extend(
    $bootstrap-tabs,
    (
        _meta: (
            theme: 'bootstrap',
            variant: 'dark',
        ),
    )
);

/// Generates a dark indigo tabs schema.
/// @type {Map}
/// @prop {Map} item-hover-background [contrast-color: ('gray', 50, .1)] - The background used for the tabs on hover.
/// @prop {Map} item-text-color [contrast-color: ('gray', 50, .8)] - The color used for the tab text color.
/// @prop {Map} item-hover-color [contrast-color: ('gray', 50)] - The text color used for the tabs on hover.
/// @prop {Map} item-active-color [contrast-color: ('gray', 50)] - The color used for the active tabs text.
/// @prop {Map} item-disabled-color [contrast-color: ('gray', 50, .2)] - The color used for the disabled tabs text.
/// @prop {Map} item-icon-color [contrast-color: ('gray', 50, .6)] - The color used for the tab icon.
/// @prop {Map} item-hover-icon-color [contrast-color: ('gray', 50, .8)] - The color used for the tab icon on hover.
/// @prop {Map} item-active-icon-color [contrast-color: ('gray', 50, .8)] - The color used for the active tab icon.
/// @prop {Map} item-disabled-icon-color [contrast-color: ('gray', 50, .2)] - The color used for the disabled tab icon.
/// @prop {Map} border-color [contrast-color: ('gray', 50, .15)] - The color used for the tab items bottom border.
/// @prop {Map} border-color--hover [contrast-color: ('gray', 50, .15)] - The color used for the tab items bottom border on hover/focus.
/// @prop {Map} button-color [contrast-color: ('gray', 50, .8)] - The color used for the button icon/text color.
/// @prop {Map} button-hover-color [contrast-color: ('gray', 50)] - The color used for the button icon/text color on hover.
/// @prop {Map} button-disabled-color [contrast-color: ('gray', 50, .2)] - The color used for the disabled button icon/text.
/// @prop {Map} button-hover-background [contrast-color: ('gray', 50, .10)] - The color used for the button background on hover.
/// @requires $indigo-tabs
$dark-indigo-tabs: extend(
    $indigo-tabs,
    (
        item-hover-background: (
            contrast-color: (
                'gray',
                50,
                0.1,
            ),
        ),
        item-text-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        item-hover-color: (
            contrast-color: (
                'gray',
                50,
            ),
        ),
        item-active-color: (
            contrast-color: (
                'gray',
                50,
            ),
        ),
        item-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        item-icon-color: (
            contrast-color: (
                'gray',
                50,
                0.6,
            ),
        ),
        item-hover-icon-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        item-active-icon-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        item-disabled-icon-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        border-color: (
            contrast-color: (
                'gray',
                50,
                0.15,
            ),
        ),
        border-color--hover: (
            contrast-color: (
                'gray',
                50,
                0.15,
            ),
        ),
        button-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        button-hover-color: (
            contrast-color: (
                'gray',
                50,
            ),
        ),
        button-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        button-hover-background: (
            contrast-color: (
                'gray',
                50,
                0.1,
            ),
        ),
        _meta: (
            theme: 'indigo',
            variant: 'dark',
        ),
    )
);
