//
// Copyright IBM Corp. 2016, 2018
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@import 'helper-classes';

/// @access private
/// @type Map
/// @group global-layout
$z-indexes: (
  modal: 9000,
  overlay: 8000,
  dropdown: 9100,
  header: 6000,
  footer: 5000,
  hidden: - 1,
  overflowHidden: - 1,
  floating: 10000,
);

/// @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);
}
