// stylelint-disable max-line-length
@use '../../../../utils/map' as *;
@use '../../../../typography/functions' as *;

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

/// Generates a light combo schema.
/// @type Map
/// @prop {Map} empty-list-background [color: 'surface'] - The combo list background color.
/// @prop {Color} search-separator-border-color [transparent] - The combo search box separator color.
/// @prop {Map} empty-list-placeholder-color [color: ('gray', 700)] - The combo placeholder text color.
/// @prop {Map} toggle-button-background [color: ('gray', 300)] - The combo toggle button background color.
/// @prop {Map} toggle-button-background-focus [color: ('gray', 300)] - The combo toggle button background color when the combo is focused.
/// @prop {Map} toggle-button-foreground [color: ('gray', 700)] - The combo toggle button foreground color.
/// @prop {Map} toggle-button-foreground-focus [color: ('gray', 900)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground-filled [color: ('gray', 900)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-background-disabled [color: ('gray', 100)] - The combo toggle button background color when the combo is disabled.
/// @prop {Map} toggle-button-foreground-disabled [color: ('gray', 500)] - The combo toggle button foreground color when the combo is disabled.
/// @prop {Map} toggle-button-background-focus--border [color: ('gray', 300)] - The combo toggle button background color when the combo is focused in border and line variants.
/// @prop {Color} clear-button-background [transparent] - The combo clear button background color.
/// @prop {Map} clear-button-foreground [color: ('gray', 900)] - The combo toggle clear foreground color.
/// @prop {Map} clear-button-foreground-focus [color: ('gray', 900)] - The combo clear button foreground color when the combo is focused.
/// @prop {Map} case-icon-color [color: ('gray', 400)] - The case sensitive icon color in inactive state for combo search input
/// @prop {Map} case-icon-color--active [color: ('primary', 500)] - The case sensitive icon color in active state for combo search input
/// @prop {Number} default-size [2] - The default size used for the combo component.
$light-combo: (
    toggle-button-background-focus--border: (
        color: (
            'gray',
            300,
        ),
    ),
    case-icon-color: (
        color: (
            'gray',
            400,
        ),
    ),
    case-icon-color--active: (
        color: (
            'primary',
            500,
        ),
    ),
    empty-list-background: (
        color: 'surface',
    ),
    search-separator-border-color: transparent,
    empty-list-placeholder-color: (
        color: (
            'gray',
            700,
        ),
    ),
    toggle-button-background: (
        color: (
            'gray',
            300,
        ),
    ),
    toggle-button-background-focus: (
        color: (
            'gray',
            300,
        ),
    ),
    toggle-button-foreground: (
        color: (
            'gray',
            700,
        ),
    ),
    toggle-button-foreground-focus: (
        color: (
            'gray',
            900,
        ),
    ),
    toggle-button-foreground-filled: (
        color: (
            'gray',
            900,
        ),
    ),
    clear-button-background: transparent,
    clear-button-foreground: (
        color: (
            'gray',
            900,
        ),
    ),
    clear-button-foreground-focus: (
        color: (
            'gray',
            900,
        ),
    ),
    toggle-button-background-disabled: (
        color: (
            'gray',
            100,
        ),
    ),
    toggle-button-foreground-disabled: (
        color: (
            'gray',
            500,
        ),
    ),
    default-size: 2,
    _meta: (
        name: 'combo',
        variant: 'light',
    ),
);

/// Generates a material combo schema.
/// @type Map
/// @prop {Map} toggle-button-background-focus [color: ('gray', 400)] - The combo toggle button background color when the combo is focused.
/// @prop {Color} clear-button-background-focus [transparent] - The combo clear button background color when the combo is focused.
/// @requires $light-combo
$material-combo: extend(
    $light-combo,
    (
        toggle-button-background-focus: (
            color: (
                'gray',
                400,
            ),
        ),
        clear-button-background-focus: transparent,
        _meta: (
            theme: 'material',
        ),
    )
);

/// Generates a fluent combo schema.
/// @type Map
/// @prop {Map} toggle-button-background [color: ('gray', 100)] - The combo toggle button background color.
/// @prop {Map} toggle-button-background-focus [color: ('gray', 100)] - The combo toggle button background color when the combo is focused.
/// @prop {Map} clear-button-foreground [color: ('gray', 700)] - The combo toggle clear foreground color.
/// @prop {Map} clear-button-foreground-focus [color: ('gray', 700)] - The combo clear button foreground color when the combo is focused.
/// @prop {Map} clear-button-background [color: ('gray', 100)] - The combo clear button background color.
/// @prop {Map} clear-button-background-focus [color: ('gray', 100)] - The combo clear button background color when the combo is focused.
/// @prop {Map} toggle-button-foreground-focus [color: ('gray', 700)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground-filled [color: ('gray', 700)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-background-disabled [color: ('gray', 100)] - The combo toggle button background color when the combo is disabled.
/// @requires $light-combo
$fluent-combo: extend(
    $light-combo,
    (
        toggle-button-background: (
            color: (
                'gray',
                100,
            ),
        ),
        toggle-button-background-focus: (
            color: (
                'gray',
                100,
            ),
        ),
        toggle-button-foreground-focus: (
            color: (
                'gray',
                700,
            ),
        ),
        toggle-button-foreground-filled: (
            color: (
                'gray',
                700,
            ),
        ),
        clear-button-foreground: (
            color: (
                'gray',
                700,
            ),
        ),
        clear-button-foreground-focus: (
            color: (
                'gray',
                700,
            ),
        ),
        clear-button-background: (
            color: (
                'gray',
                100,
            ),
        ),
        clear-button-background-focus: (
            color: (
                'gray',
                100,
            ),
        ),
        toggle-button-background-disabled: (
            color: (
                'gray',
                100,
            ),
        ),
        _meta: (
            theme: 'fluent',
        ),
    )
);

/// Generates a bootstrap combo schema.
/// @type Map
/// @prop {Map} toggle-button-foreground [color: ('gray', 800)] - The combo toggle button foreground color.
/// @prop {Map} toggle-button-foreground-focus [color: ('gray', 800)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground-filled [color: ('gray', 800)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground-disabled [color: ('gray', 400)] - The combo toggle button foreground color when the combo is disabled.
/// @prop {Map} empty-list-background [color: ('surface')] - The combo list background color.
/// @prop {Map} empty-list-placeholder-color [color: ('gray', 600)] - The combo placeholder text color.
/// @prop {Map} clear-button-background [color: ('gray', 300)] - The combo clear button background color.
/// @prop {Map} clear-button-background-focus [color: ('gray', 300)] - The combo clear button background color when the combo is focused.
/// @prop {Map} clear-button-foreground [color: ('gray', 800)] - The combo toggle clear foreground color.
/// @prop {Map} clear-button-foreground-focus [color: ('gray', 800)] - The combo clear button foreground color when the combo is focused.
/// @requires $light-combo
$bootstrap-combo: extend(
    $light-combo,
    (
        empty-list-background: (
            color: (
                'surface',
            ),
        ),
        empty-list-placeholder-color: (
            color: (
                'gray',
                600,
            ),
        ),
        clear-button-foreground: (
            color: (
                'gray',
                800,
            ),
        ),
        clear-button-foreground-focus: (
            color: (
                'gray',
                800,
            ),
        ),
        clear-button-background: (
            color: (
                'gray',
                300,
            ),
        ),
        clear-button-background-focus: (
            color: (
                'gray',
                300,
            ),
        ),
        toggle-button-foreground: (
            color: (
                'gray',
                800,
            ),
        ),
        toggle-button-foreground-focus: (
            color: (
                'gray',
                800,
            ),
        ),
        toggle-button-foreground-filled: (
            color: (
                'gray',
                800,
            ),
        ),
        toggle-button-foreground-disabled: (
            color: (
                'gray',
                400,
            ),
        ),
        _meta: (
            theme: 'bootstrap',
        ),
    )
);

/// Generates an indigo combo schema.
/// @type Map
/// @prop {Map} empty-list-placeholder-color [color: ('gray', 600)] - The combo placeholder text color.
/// @prop {Color} clear-button-background-focus [transparent] - The combo clear button background color when the combo is focused.
/// @prop {Map} clear-button-foreground [color: ('gray', 600)] - The combo toggle clear foreground color.
/// @prop {Map} clear-button-foreground-focus [color: ('gray', 600)] - The combo clear button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground [color: ('gray', 600)] - The combo toggle button foreground color.
/// @prop {Map} toggle-button-foreground-filled [color: ('gray', 600)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-foreground-focus [color: ('gray', 700)] - The combo toggle button foreground color when the combo is focused.
/// @prop {Map} toggle-button-background [color: transparent] - The combo toggle button background color.
/// @prop {Map} toggle-button-background-focus [transparent] - The combo toggle button background color when the combo is focused.
/// @prop {Map} toggle-button-background-focus--border [transparent] - The combo toggle button background color when the combo is focused.
/// @prop {Color} toggle-button-background-disabled [transparent] - The combo toggle button background color when the combo is disabled.
/// @prop {Map} toggle-button-foreground-disabled [color: ('gray', 900, .2)] - The combo toggle button foreground color when the combo is disabled.
/// @requires $light-combo
$indigo-combo: extend(
    $light-combo,
    (
        empty-list-placeholder-color: (
            color: (
                'gray',
                600,
            ),
        ),
        clear-button-background-focus: transparent,
        clear-button-foreground: (
            color: (
                'gray',
                600,
            ),
        ),
        clear-button-foreground-focus: (
            color: (
                'gray',
                600,
            ),
        ),
        toggle-button-background: transparent,
        toggle-button-foreground: (
            color: (
                'gray',
                600,
            ),
        ),
        toggle-button-foreground-filled: (
            color: (
                'gray',
                600,
            ),
        ),
        toggle-button-foreground-focus: (
            color: (
                'gray',
                700,
            ),
        ),
        toggle-button-background-focus: transparent,
        toggle-button-background-focus--border: transparent,
        toggle-button-background-disabled: transparent,
        toggle-button-foreground-disabled: (
            color: (
                'gray',
                900,
                0.2,
            ),
        ),
        _meta: (
            theme: 'indigo',
        ),
    )
);
