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

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

// stylelint-disable max-line-length
/// Generates a dark material switch schema.
/// @type {Map}
/// @prop {Map} thumb-off-color [color: ('gray', 100)] - The color of the thumb when the switch is off.
/// @prop {Map} thumb-disabled-color [color: ('gray', 200)] - The color of the thumb when the switch is disabled.
/// @requires $material-switch
$dark-material-switch: extend(
    $material-switch,
    (
        thumb-off-color: (
            color: (
                'gray',
                100,
            ),
        ),
        thumb-disabled-color: (
            color: (
                'gray',
                200,
            ),
        ),
        _meta: (
            theme: 'material',
            variant: 'dark',
        ),
    )
);

/// Generates a dark fluent switch schema.
/// @type {Map}
/// @prop {Map} focus-outline-color [color: ('gray', 400)] - The focus outlined color.
/// @prop {Map} border-color [color: ('gray', 400)] - The border color of the switch.
/// @prop {Map} border-on-color [color: ('primary', 300)] - The border color of the on-switch.
/// @prop {Map} border-on-hover-color [color('primary',100)] - The border color of the on-switch.
/// @prop {Map} track-on-color [color: ('primary', 300)] - The color of the track when the switch is on.
/// @prop {Map} track-on-hover-color [color: ('primary', 100)] - The color of the track when the switch is on and hovered.
/// @prop {Map} track-off-color [color: ('gray', 50)] - The color of the track when the switch is off.
/// @prop {Map} thumb-off-color [color: ('gray', 400)] - The color of the thumb when the switch is off.
/// @prop {Map} label-disabled-color [color: ('gray', 300)] - The color of the switch label when the switch is disabled
/// @prop {Map} border-disabled-color [color: ('gray', 100)] - The border color of the disabled switch.
/// @prop {Map} track-disabled-color [color: ('gray', 50)] - The color of the track when the switch is disabled.
/// @prop {Map} track-on-disabled-color [color: ('gray', 100)] - The color of the track when the switch is on and disabled.
/// @prop {Map} thumb-disabled-color [color: ('gray', 100)] - The color of the thumb when the switch is disabled.
/// @prop {Map} thumb-on-disabled-color [color: ('gray', 50)] - The color of the thumb when the switch is on and disabled.
/// @requires $fluent-switch
$dark-fluent-switch: extend(
    $fluent-switch,
    (
        focus-outline-color: (
            color: (
                'gray',
                400,
            ),
        ),
        border-color: (
            color: (
                'gray',
                400,
            ),
        ),
        border-on-color: (
            color: (
                'primary',
                300,
            ),
        ),
        border-on-hover-color: (
            color: (
                'primary',
                100,
            ),
        ),
        track-on-color: (
            color: (
                'primary',
                300,
            ),
        ),
        track-off-color: (
            color: (
                'gray',
                50,
            ),
        ),
        track-on-hover-color: (
            color: (
                'primary',
                100,
            ),
        ),
        thumb-off-color: (
            color: (
                'gray',
                400,
            ),
        ),
        label-disabled-color: (
            color: (
                'gray',
                300,
            ),
        ),
        border-disabled-color: (
            color: (
                'gray',
                100,
            ),
        ),
        track-disabled-color: (
            color: (
                'gray',
                50,
            ),
        ),
        track-on-disabled-color: (
            color: (
                'gray',
                100,
            ),
        ),
        thumb-disabled-color: (
            color: (
                'gray',
                100,
            ),
        ),
        thumb-on-disabled-color: (
            color: (
                'gray',
                50,
            ),
        ),
        _meta: (
            theme: 'fluent',
            variant: 'dark',
        ),
    )
);

/// Generates a dark bootstrap switch schema.
/// @type {Map}
/// @prop {Map} focus-outline-color [color: ('primary', 900, 0.5)] - The focus outlined color.
/// @prop {Map} label-disabled-color [color: ('gray', 300)] - The color of the switch label when the switch is disabled
/// @prop {Map} border-disabled-color [color: ('gray', 100)] - The border color of the disabled switch.
/// @prop {Map} track-disabled-color [color: 'surface'] - The color of the track when the switch is on and disabled.
/// @prop {Map} thumb-disabled-color [color: ('gray', 100)] - The color of the thumb when the switch is on and disabled.
/// @requires $bootstrap-switch
$dark-bootstrap-switch: extend(
    $bootstrap-switch,
    (
        focus-outline-color: (
            color: (
                'primary',
                900,
                0.5,
            ),
        ),
        label-disabled-color: (
            color: (
                'gray',
                300,
            ),
        ),
        border-disabled-color: (
            color: (
                'gray',
                100,
            ),
        ),
        track-disabled-color: (
            color: 'surface',
        ),
        thumb-disabled-color: (
            color: (
                'gray',
                100,
            ),
        ),
        _meta: (
            theme: 'bootstrap',
            variant: 'dark',
        ),
    )
);

/// Generates a dark indigo switch schema.
/// @type {Map}
/// @prop {Map} label-color [contrast-color: ('gray', 50, .8)] - The color of the switch label.
/// @prop {Map} label-hover-color [contrast-color: ('gray', 50)] - The color of the switch label on hover.
/// @prop {Map} label-disabled-color [contrast-color: ('gray', 50, .2)] - The color of the switch label when the switch is disabled.
/// @prop {Map} thumb-off-color [contrast-color: ('gray', 50, .6)] - The color of the thumb when the switch is off.
/// @prop {Map} thumb-on-color [contrast-color: ('gray', 50)] - The color of the thumb when the switch is on.
/// @prop {Map} thumb-disabled-color [contrast-color: ('gray', 50, .2)] - The color of the thumb when the switch is disabled.
/// @prop {Map} thumb-on-disabled-color [contrast-color: ('gray', 50, .2)] - The color of the thumb when the switch is on and disabled.
/// @prop {Map} border-color [contrast-color: ('gray', 50, .6)] - The border color of the switch.
/// @prop {Map} border-hover-color [contrast-color: ('gray', 50, .8)] - The border color of the switch on hover.
/// @prop {Map} border-disabled-color [contrast-color: ('gray', 50, .2)] - The border color of the disabled switch.
/// @prop {Map} focus-outline-color [contrast-color: ('gray', 50, .2)] - The focus outlined color.
/// @requires $indigo-switch
$dark-indigo-switch: extend(
    $indigo-switch,
    (
        label-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        label-hover-color: (
            contrast-color: (
                'gray',
                50,
            ),
        ),
        label-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        thumb-off-color: (
            contrast-color: (
                'gray',
                50,
                0.6,
            ),
        ),
        thumb-on-color: (
            contrast-color: (
                'gray',
                50,
            ),
        ),
        thumb-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        thumb-on-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        border-color: (
            contrast-color: (
                'gray',
                50,
                0.6,
            ),
        ),
        border-hover-color: (
            contrast-color: (
                'gray',
                50,
                0.8,
            ),
        ),
        border-disabled-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        focus-outline-color: (
            contrast-color: (
                'gray',
                50,
                0.2,
            ),
        ),
        _meta: (
            theme: 'indigo',
            variant: 'dark',
        ),
    )
);
