/// @access private
/// @type Map
/// @group global-layout
$z-indexes: (
  cds-layer-extra-low: 100,
  cds-layer-low: 200,
  cds-layer-middle: 400,
  cds-layer-high: 600,
  cds-layer-extra-high: 800,
);

/// @access public
/// @param {String} $layer - Value from `$z-indexes` map
/// @group global-layout
/// @example - scss
///   .modal {
///     z-index: z('modal');
///   }
@function z($layer) {
  @if not map-has-key($z-indexes, $layer) {
    @warn 'No layer found for `#{$layer}` in $z-indexes map. Property omitted.';
  }

  @return map-get($z-indexes, $layer);
}
