//
// 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';
@import './vendor/@rocketsoftware/elements/scss/layout/layout';

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

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