@import "../helper";

@mixin border-style($prefix, $variants: (), $separator: '_') {
  $map-values: (
    solid: solid,
    dashed: dashed,
    dotted: dotted,
    none: none,
  );
  $map-props: (
    default: border-style,
  );
  @include style($prefix, border, $map-values, $map-props, $variants, $separator);
}

@mixin border-width($prefix, $map-values, $variants: (), $separator: '_') {
  $map-props: (
    default: border-width,
    t: border-top-width,
    r: border-right-width,
    b: border-bottom-width,
    l: border-left-width,
  );
  @include style($prefix, border, $map-values, $map-props, $variants, $separator);
}

@mixin border-radius($prefix, $map-values, $variants: (), $separator: '_') {
  $map-props: (
    default: border-radius,
    t: border-top-left-radius border-top-right-radius,
    r: border-top-right-radius border-bottom-right-radius,
    b: border-bottom-left-radius border-bottom-right-radius,
    l: border-top-left-radius border-bottom-left-radius,
    tl: border-top-left-radius,
    tr: border-top-right-radius,
    bl: border-bottom-left-radius,
    br: border-bottom-right-radius,
  );
  @include style($prefix, rounded, $map-values, $map-props, $variants, $separator);
}

@mixin border-color($prefix, $colors, $variants: (), $separator: '_') {
  $map-props: (
    default: border-color,
  );
  @include style-color($prefix, border, $colors, $map-props, $variants, $separator);
}

@mixin border-collapse($prefix, $variants: (), $separator: '_') {
  $map-values: (
    collapse: collapse,
    separate: separate,
  );
  $map-props: (
    default: border-collapse,
  );
  @include style($prefix, border, $map-values, $map-props, $variants, $separator);
}
