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

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

// stylelint-disable max-line-length

/// Generates a base dark select schema.
/// @access private
/// @type Map
$dark-base-select: (
    _meta: (
        name: 'select',
        variant: 'dark',
    ),
);

/// Generates a dark material select schema.
/// @type Map
/// @prop {Map} toggle-button-background [color: ('gray', 100)] - The select toggle button background color.
/// @prop {Map} toggle-button-background-focus [color: ('gray', 200)] - The select toggle button background color when the select is focused.
/// @prop {Map} toggle-button-background-focus--border [color: ('gray', 100)] - The select toggle button background color when the select is focused in material border and line variants.
/// @requires $material-select
$dark-material-select: extend(
    $material-select,
    $dark-base-select,
    (
        toggle-button-background: (
            color: (
                'gray',
                100,
            ),
        ),
        toggle-button-background-focus: (
            color: (
                'gray',
                200,
            ),
        ),
        toggle-button-background-focus--border: (
            color: (
                'gray',
                100,
            ),
        ),
    )
);

/// Generates a dark fluent select schema.
/// @type Map
/// @prop {Map} toggle-button-background [color: ('gray', 50)] - The select toggle button background color.
/// @prop {Map} toggle-button-background-focus [color: ('gray', 50)] - The select toggle button background color when the select is focused.
/// @prop {Map} toggle-button-foreground [color: ('gray', 400)] - The select toggle button foreground color.
/// @prop {Map} toggle-button-foreground-focus [color: ('gray', 400)] - The select toggle button foreground color when the select is focused.
/// @prop {Map} toggle-button-foreground-filled [color: ('gray', 400)] - The select toggle button foreground color when the select is filled.
/// @prop {Map} toggle-button-foreground-disabled [color: ('gray', 300)] - The select toggle button foreground color when the select is disabled.
/// @requires $fluent-select
$dark-fluent-select: extend(
    $fluent-select,
    $dark-base-select,
    (
        toggle-button-background: (
            color: (
                'gray',
                50,
            ),
        ),
        toggle-button-background-focus: (
            color: (
                'gray',
                50,
            ),
        ),
        toggle-button-foreground: (
            color: (
                'gray',
                400,
            ),
        ),
        toggle-button-foreground-focus: (
            color: (
                'gray',
                400,
            ),
        ),
        toggle-button-foreground-filled: (
            color: (
                'gray',
                400,
            ),
        ),
        toggle-button-foreground-disabled: (
            color: (
                'gray',
                300,
            ),
        ),
    )
);

/// Generates a dark bootstrap select schema.
/// @type Map
/// @requires $bootstrap-select
$dark-bootstrap-select: extend($bootstrap-select, $dark-base-select);

/// Generates a dark indigo select schema.
/// @type Map
/// @prop {Map} toggle-button-foreground [contrast-color: ('gray', 100, .6)] - The select toggle button foreground color.
/// @prop {Map} toggle-button-foreground-focus [contrast-color: ('gray', 100, .6)] - The select toggle button foreground color when the select is focused.
/// @prop {Map} toggle-button-foreground-filled [contrast-color: ('gray', 100, .8)] - The select toggle button foreground color when the select is focused.
/// @prop {Map} toggle-button-foreground-disabled [contrast-color: ('gray', 100, .2)] - The select toggle button foreground color when the select is disabled.
/// @requires $indigo-select
$dark-indigo-select: extend(
    $indigo-select,
    $dark-base-select,
    (
        toggle-button-foreground: (
            contrast-color: (
                'gray',
                100,
                0.6,
            ),
        ),
        toggle-button-foreground-filled: (
            contrast-color: (
                'gray',
                100,
                0.6,
            ),
        ),
        toggle-button-foreground-focus: (
            contrast-color: (
                'gray',
                100,
                0.8,
            ),
        ),
        toggle-button-foreground-disabled: (
            contrast-color: (
                'gray',
                100,
                0.2,
            ),
        ),
    )
);
