@use '../../settings/variables' as v;

// ==========================================================================
// _zIndex.scss
//
// Contains all functions relating to zIndex
// ==========================================================================

// zIndex()
//
// Allows developers to specify the amount of zIndex they require via shortcut
// Accesses the spacing map definition in _variables.scss
//
// Usage:
// zIndex(low)
//
// Key can be passed in as = lowest, low, medium, high
// ==========================================================================
@function zIndex($key: 'lowest') {
    @if type-of(v.$zIndex) == 'map' {
        @if map-has-key(v.$zIndex, $key) {
            @return map-get(v.$zIndex, $key);
        }
    }

    @warn 'Unknown `#{$key}` in $zIndex.';
    @return null;
}
