@use "sass:map";

// @deprecated
@mixin media($minWidth, $maxWidth) {
  @media (min-width: $minWidth) and (max-width: $maxWidth) {
    @content;
  }
}

// @deprecated
@mixin media_max($maxWidth) {
  @media (max-width: $maxWidth) {
    @content;
  }
}

// @deprecated
@mixin media_min($minWidth) {
  @media (min-width: $minWidth) {
    @content;
  }
}

$breakpoints: (
  xl: 1600px,
  lg: 1400px,
  md: 1200px,
  sm: 960px,
);

@mixin max($breakpoint) {
  $value: map.get($breakpoints, $breakpoint);

  @if $value {
    @media (max-width: $value) {
      @content;
    }
  } @else {
    @error "Breakpoint #{$breakpoint} not found";
  }
}
