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

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

/// Generates a light carousel schema.
/// @type Map
/// @prop {Map} slide-background [contrast-color: ('gray', 900)] - The slide background color.
/// @prop {Map} button-background [color: ('gray', 50)] - The previous/next buttons idle background color.
/// @prop {Map} button-hover-background [color: ('gray', 50)] - The previous/next buttons hover background color.
/// @prop {Map} button-disabled-background [color: ('gray', 100)] - The previous/next buttons disabled background color.
/// @prop {Map} button-arrow-color [color: ('gray', 700)] - The previous/next buttons idle arrow color.
/// @prop {Map} button-hover-arrow-color [color: ('gray', 900)] - The previous/next buttons hover arrow color.
/// @prop {Map} button-disabled-arrow-color [color: ('gray' 400)] - The previous/next buttons disabled color.
/// @prop {Color} button-border-color [transparent] - The previous/next buttons idle border color.
/// @prop {Color} button-hover-border-color [transparent] - The previous/next buttons hover border color.
/// @prop {Color} button-disabled-border-color [transparent] - The previous/next buttons disabled border color.
/// @prop {Map} indicator-focus-color [color: ('secondary', 600)] - The indicators border and dot color on focus.
/// @prop {Map} button-focus-border-color [color: ('secondary', 600)] - The navigation buttons border color on focus.
/// @prop {Map} indicator-background [color: ('gray', 50)] - The indicators container background color.
/// @prop {Map} label-indicator-background [color: ('gray', 50, .8)] - The label indicator container background color.
/// @prop {Color} indicator-dot-color [transparent] - The idle indicator dot color.
/// @prop {Color} indicator-hover-dot-color [transparent] - The hover indicator dot color.
/// @prop {Map} indicator-border-color [color: ('gray', 900, .7)] - The idle indicator border color.
/// @prop {Map} indicator-active-dot-color [color: ('gray', 900)] - The active indicator dot color.
/// @prop {Map} indicator-active-border-color [color: ('gray', 900)] - The active indicator border color.
/// @prop {Map} indicator-active-hover-dot-color [color: ('gray', 900)] - The active indicator dot color on hover.
/// @prop {Number} button-elevation [1] - The elevation level, between 0-24, to be used for the carousel buttons.
/// @prop {List} border-radius [(rem(36px), rem(0), rem(36px))] - The border radius used for carousel.
/// @requires $default-elevation-carousel
$light-carousel: extend(
    $default-elevation-carousel,
    (
        slide-background: (
            contrast-color: (
                'gray',
                900,
            ),
        ),

        button-background: (
            color: (
                'gray',
                50,
            ),
        ),

        button-hover-background: (
            color: (
                'gray',
                50,
            ),
        ),

        button-arrow-color: (
            color: (
                'gray',
                700,
            ),
        ),

        button-hover-arrow-color: (
            color: (
                'gray',
                900,
            ),
        ),

        button-disabled-background: (
            color: (
                'gray',
                100,
            ),
        ),

        button-disabled-arrow-color: (
            color: (
                'gray',
                400,
            ),
        ),

        indicator-focus-color: (
            color: (
                'secondary',
                600,
            ),
        ),

        button-focus-border-color: (
            color: (
                'secondary',
                600,
            ),
        ),

        button-border-color: transparent,
        button-hover-border-color: transparent,
        button-disabled-border-color: transparent,
        indicator-dot-color: transparent,
        indicator-hover-dot-color: transparent,

        indicator-background: (
            color: (
                'gray',
                50,
            ),
        ),

        label-indicator-background: (
            color: (
                'gray',
                50,
                0.8,
            ),
        ),

        indicator-color: (
            color: (
                'gray',
                700,
            ),
        ),

        indicator-border-color: (
            color: (
                'gray',
                900,
                0.7,
            ),
        ),

        indicator-active-dot-color: (
            color: (
                'gray',
                900,
            ),
        ),

        indicator-active-border-color: (
            color: (
                'gray',
                900,
            ),
        ),

        indicator-active-hover-dot-color: (
            color: (
                'gray',
                900,
            ),
        ),

        border-radius: (
            border-radius: (
                rem(36px),
                rem(0),
                rem(36px),
            ),
        ),

        _meta: (
            name: 'carousel',
            variant: 'light',
        ),
    )
);

/// Generates a material carousel schema.
/// @type Map
/// @prop {Map} button-focus-arrow-color [color: ('secondary', 600)] - The previous/next buttons focus arrow color.
/// @requires $light-carousel
$material-carousel: extend(
    $light-carousel,
    (
        button-focus-arrow-color: (
            color: (
                'secondary',
                600,
            ),
        ),

        _meta: (
            theme: 'material',
        ),
    )
);

/// Generates a fluent carousel schema.
/// @type Map
/// @prop {Map} button-focus-arrow-color [color: ('primary', 600)] - The previous/next buttons focus arrow color.
/// @prop {Map} button-disabled-background [color: ('gray', 300)] - The previous/next buttons disabled background color.
/// @prop {Map} button-disabled-arrow-color [color: ('gray' 500)] - The previous/next buttons disabled color.
/// @prop {Map} indicator-focus-color [color: ('primary', 600)] - The buttons/indicators border color on focus.
/// @prop {Map} button-focus-border-color [color: ('gray', 700)] - The navigation buttons border color on focus.
/// @prop {List} border-radius [(rem(2px), rem(0), rem(36px))] - The border radius used for carousel.
/// @requires $light-carousel
$fluent-carousel: extend(
    $light-carousel,
    (
        button-focus-arrow-color: (
            color: (
                'primary',
                600,
            ),
        ),

        button-disabled-background: (
            color: (
                'gray',
                300,
            ),
        ),

        button-disabled-arrow-color: (
            color: (
                'gray',
                500,
            ),
        ),

        indicator-focus-color: (
            color: (
                'primary',
                600,
            ),
        ),

        button-focus-border-color: (
            color: (
                'gray',
                700,
            ),
        ),

        border-radius: (
            border-radius: (
                rem(2px),
                rem(0),
                rem(36px),
            ),
        ),

        _meta: (
            theme: 'fluent',
        ),
    )
);

/// Generates a bootstrap carousel schema.
/// @type Map
/// @prop {Map} button-focus-arrow-color [color: ('gray', 700)] - The previous/next buttons focus arrow color.
/// @prop {Map} indicator-focus-color [color: ('primary', 600)] - The buttons/indicators border color on focus.
/// @prop {Map} button-focus-border-color [color: ('primary', 600, .5)] - The navigation buttons border color on focus.
/// @prop {List} border-radius [(rem(4px), rem(0), rem(36px))] - The border radius used for carousel.
/// @prop {Number} button-elevation [0] - The elevation level, between 0-24, to be used for the carousel buttons.
/// @requires $light-carousel
/// @requires $bootstrap-elevation-carousel
$bootstrap-carousel: extend(
    $light-carousel,
    $bootstrap-elevation-carousel,
    (
        button-focus-arrow-color: (
            color: (
                'gray',
                700,
            ),
        ),

        indicator-focus-color: (
            color: (
                'primary',
                600,
            ),
        ),

        button-focus-border-color: (
            color: (
                'primary',
                600,
                0.5,
            ),
        ),

        border-radius: (
            border-radius: (
                rem(4px),
                rem(0),
                rem(36px),
            ),
        ),

        _meta: (
            theme: 'bootstrap',
        ),
    )
);

/// Generates an indigo carousel schema.
/// @type Map
/// @prop {Map} button-arrow-color [color: ('gray', 600)] - The previous/next buttons idle arrow color.
/// @prop {Map} button-hover-background [color: ('gray', 200)] - The previous/next buttons hover background color.
/// @prop {Map} button-hover-arrow-color [color: ('gray', 700)] - The previous/next buttons hover arrow color.
/// @prop {Map} button-focus-arrow-color [color: ('gray', 600)] - The previous/next buttons focus arrow color.
/// @prop {Map} button-border-color [color: ('gray', 400)] - The previous/next buttons idle border color.
/// @prop {Map} button-hover-border-color [color: ('gray', 500)] - The previous/next buttons hover border color.
/// @prop {Map} button-disabled-border-color [color: ('gray', 900, .15)] - The previous/next buttons disabled border color.
/// @prop {Map} button-disabled-background [color: ('gray', 50)] - The previous/next buttons disabled background color.
/// @prop {Map} button-disabled-arrow-color [color: ('gray' 900, .2)] - The previous/next buttons disabled color.
/// @prop {Map} indicator-dot-color [color: ('gray', 500)] - The idle indicator dot color.
/// @prop {Map} indicator-hover-dot-color [color: ('gray', 600)] - The hover indicator dot color.
/// @prop {Map} indicator-active-border-color [color: ('primary', 500)] - The active indicator border color.
/// @prop {Map} indicator-active-dot-color [color: ('primary', 500)] - The active indicator dot color.
/// @prop {Map} indicator-active-hover-dot-color [color: ('primary', 400)] - The active indicator dot color on hover.
/// @prop {Map} indicator-focus-color [color: ('primary', 400, .5)] - The indicators border and dot color on focus.
/// @prop {Map} button-focus-border-color [color: ('primary', 500)] - The navigation buttons border color on focus.
/// @prop {Number} button-elevation [0] - The elevation level, between 0-24, to be used for the carousel buttons.
/// @requires $light-carousel
/// @requires $indigo-elevation-carousel
$indigo-carousel: extend(
    $light-carousel,
    $indigo-elevation-carousel,
    (
        button-arrow-color: (
            color: (
                'gray',
                600,
            ),
        ),

        button-hover-background: (
            color: (
                'gray',
                200,
            ),
        ),

        button-hover-arrow-color: (
            color: (
                'gray',
                700,
            ),
        ),

        button-focus-arrow-color: (
            color: (
                'gray',
                600,
            ),
        ),

        button-border-color: (
            color: (
                'gray',
                400,
            ),
        ),

        button-hover-border-color: (
            color: (
                'gray',
                500,
            ),
        ),

        button-disabled-border-color: (
            color: (
                'gray',
                900,
                0.15,
            ),
        ),

        button-disabled-background: (
            color: (
                'gray',
                50,
            ),
        ),

        button-disabled-arrow-color: (
            color: (
                'gray',
                900,
                0.2,
            ),
        ),

        indicator-dot-color: (
            color: (
                'gray',
                500,
            ),
        ),

        indicator-hover-dot-color: (
            color: (
                'gray',
                600,
            ),
        ),

        indicator-active-border-color: (
            color: (
                'primary',
                500,
            ),
        ),

        indicator-active-dot-color: (
            color: (
                'primary',
                500,
            ),
        ),

        indicator-active-hover-dot-color: (
            color: (
                'primary',
                400,
            ),
        ),

        indicator-focus-color: (
            color: (
                'primary',
                400,
                0.5,
            ),
        ),

        button-focus-border-color: (
            color: (
                'primary',
                500,
            ),
        ),

        _meta: (
            theme: 'indigo',
        ),
    )
);
