@use "sass:map";
@use "../cunningham-tokens" as *;

@function breakpoint($name, $tokens: $themes) {
  @return map.get($tokens, 'default', 'globals', 'breakpoints', $name);
}

@mixin container($name, $tokens: $themes) {
  $breakpoint: breakpoint($name, $tokens);
  @container (max-width: #{$breakpoint}) {
    @content;
  }
}
@mixin media($name, $tokens: $themes) {
  $breakpoint: breakpoint($name, $tokens);
  @media (max-width: #{$breakpoint}) {
    @content;
  }
}
