@import 'variable';

@mixin theme-map($map: ()) {
  @each $key, $value in $map {
      #{$key}: $value;
  }
}

@function theme-apply($key, $fallback: null, $map:  $qms-theme-default) {
  @if not map-has-key($map, $key) {
      @error "key: '#{$key}', is not a key in map: #{$map}";
  }
  @if ($fallback) {
      @return var($key, $fallback);
  } @else {
      @return var($key);
  }
}
