/**
 * Label print
 * @define label
 */

@use 'sass:map';

// Exposed variables
$theme: null !default;
$label: null !default;
$label-print: null !default;

.ecl-label {
  border-radius: map.get($label, 'radius');
  border: map.get($label, 'border-width') solid transparent;
  display: inline-block;
  font: map.get($theme, 'font-print', 's');
  margin: 0;
  padding: calc(
      #{map.get($label-print, 'padding-vertical')} -
        #{map.get($label, 'border-width')}
    )
    calc(
      #{map.get($label-print, 'padding-horizontal')} -
        #{map.get($label, 'border-width')}
    );
  text-transform: uppercase;
}

@mixin label($variant: null) {
  background-color: map.get($label, #{$variant}, 'background');
  border-color: map.get($label, #{$variant}, 'border-color');
  color: map.get($label, #{$variant}, 'color');
}

.ecl-label--low {
  @include label(low);
}

.ecl-label--medium {
  @include label(medium);
}

.ecl-label--high {
  @include label(high);
}

.ecl-label--highlight {
  @include label(highlight);
}
