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

@use 'sass:list';
@use '../config' as *;
@use '../utilities/custom-property';
@use './layer-sets' as *;

/// Emit the layer tokens defined in $layer-sets for the given $level
/// @param {Number} $level
@mixin emit-layer-tokens($level) {
  @each $key, $layer-set in $layer-sets {
    $value: list.nth($layer-set, $level);
    @include custom-property.declaration($key, $value);
  }
}
