@import './tokens';

$border-radiuses: () !default;
$border-widths: () !default;
$border-side-properties: () !default;
$border-radius-properties: () !default;

$border-radiuses: map-merge(
  (
    'none': $telia-border-radius-none,
    'default': $telia-border-radius-2,
    'small': $telia-border-radius-8,
    'large': $telia-border-radius-16,
    'full': $telia-border-radius-full,
  ),
  $border-radiuses
);

$border-radius-properties: map-merge(
  (
    'all': 'border-radius',
    'top-left': 'border-top-left-radius',
    'top-right': 'border-top-right-radius',
    'bottom-right': 'border-bottom-right-radius',
    'bottom-left': 'border-bottom-left-radius',
  ),
  $border-radius-properties
);

$border-widths: map-merge(
  (
    'none': $telia-border-width-0,
    'xs': $telia-border-width-1,
    'sm': $telia-border-width-2,
    'md': $telia-border-width-3,
    'xl': $telia-border-width-6,
  ),
  $border-widths
);

$border-side-properties: map-merge(
  (
    'all': 'border',
    'top': 'border-top',
    'right': 'border-right',
    'bottom': 'border-bottom',
    'left': 'border-left',
  ),
  $border-side-properties
);

$extract: map-merge(
  (
    'width-none': map-get($border-widths, 'none'),
    'width-xs': map-get($border-widths, 'xs'),
    'width-sm': map-get($border-widths, 'sm'),
    'width-md': map-get($border-widths, 'md'),
    'radius-none': map-get($border-radiuses, 'none'),
    'radius-sm': map-get($border-radiuses, 'small'),
    'radius-lg': map-get($border-radiuses, 'large'),
    'radius-default': map-get($border-radiuses, 'default'),
    'radius-full': map-get($border-radiuses, 'full'),
  ),
  $border-side-properties
);
