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

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

/// Generates a base light scrollbar schema.
/// @type Map
/// @prop {String | Number} sb-size [rem(16px)] - The size of the scrollbar.
/// @prop {String | Number} sb-thumb-min-height [rem(32px)] - The min-height of the thumb.
/// @prop {Map} sb-thumb-bg-color [color: ('gray', 400)] - The background color of the thumb.
/// @prop {Map} sb-thumb-bg-color-hover [color: ('gray', 400)] - The :hover background color of the thumb.
/// @prop {Color} sb-thumb-border-color [transparent] - The border color of the thumb.
/// @prop {String | Number} sb-thumb-border-size [0] - The border size of the thumb.
/// @prop {String | Number} sb-thumb-border-radius [0] - The border radius of the thumb.
/// @prop {Map} sb-track-bg-color [color: ('gray', 100)] - The background color of the track.
/// @prop {Map} sb-track-bg-color-hover [color: ('gray', 100)] - The :hover background color of the track.
/// @prop {Color} sb-track-border-color [transparent] - The border color of the track.
/// @prop {String | Number} sb-track-border-size [0] - The border size of the track.
/// @prop {Map} sb-corner-bg [color: ('gray', 100)] - The background color of the corner.
/// @prop {Color} sb-corner-border-color [transparent] - The border color of the corner.
/// @prop {String | Number} sb-corner-border-size [0] - The border size of the corner.
$light-scrollbar: (
    sb-size: rem(16px),
    sb-thumb-min-height: rem(32px),
    sb-thumb-bg-color: (
        color: (
            'gray',
            400,
        ),
    ),
    sb-thumb-bg-color-hover: (
        color: (
            'gray',
            400,
        ),
    ),
    sb-thumb-border-color: transparent,
    sb-thumb-border-size: 0,
    sb-thumb-border-radius: 0,

    sb-track-bg-color: (
        color: (
            'gray',
            100,
        ),
    ),
    sb-track-bg-color-hover: (
        color: (
            'gray',
            100,
        ),
    ),
    sb-track-border-color: transparent,
    sb-track-border-size: 0,

    sb-corner-bg: (
        color: (
            'gray',
            100,
        ),
    ),
    sb-corner-border-color: transparent,
    sb-corner-border-size: 0,
    _meta: (
        name: 'scrollbar',
        variant: 'light',
    ),
);

/// Generates a material scrollbar schema.
/// @type Map
/// @requires $light-scrollbar
$material-scrollbar: extend(
    $light-scrollbar,
    (
        _meta: (
            theme: 'material',
        ),
    )
);

/// Generates a fluent scrollbar schema.
/// @type Map
/// @prop {Color} sb-thumb-bg-color [color: ('gray', 300)] - The background color used for the thumb.
/// @prop {Map} sb-thumb-bg-color-hover [color: ('gray', 300)] - The :hover background color of the thumb.
/// @requires $light-scrollbar
$fluent-scrollbar: extend(
    $light-scrollbar,
    (
        sb-thumb-bg-color: (
            color: (
                'gray',
                300,
            ),
        ),
        sb-thumb-bg-color-hover: (
            color: (
                'gray',
                300,
            ),
        ),
        _meta: (
            theme: 'fluent',
        ),
    )
);

/// Generates a bootstrap scrollbar schema.
/// @type Map
/// @requires $light-scrollbar
$bootstrap-scrollbar: extend(
    $light-scrollbar,
    (
        _meta: (
            theme: 'bootstrap',
        ),
    )
);

/// Generates an indigo scrollbar schema.
/// @type Map
/// @prop {Map} sb-track-bg-color [color: ('gray', 200)] - The background color used for the track.
/// @prop {Map} sb-track-bg-color-hover [color: ('gray', 100)] - The :hover background color of the track.
/// @requires $light-scrollbar
$indigo-scrollbar: extend(
    $light-scrollbar,
    (
        sb-track-bg-color: (
            color: (
                'gray',
                200,
            ),
        ),
        sb-track-bg-color-hover: (
            color: (
                'gray',
                200,
            ),
        ),
        _meta: (
            theme: 'indigo',
        ),
    )
);
