//
// Copyright IBM Corp. 2018, 2023
//
// This source code is licensed under the Apache-2.0 license found in the
// LICENSE file in the root directory of this source tree.
//

@use '../config';
@use './src';

$font-family: 'IBM Plex Sans Thai Looped';
$name: 'IBM-Plex-Sans-Thai-Looped';
$styles: (normal);
$formats: (woff2, woff);
$package-name: 'sans-thai-looped';

@mixin thin() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 100;
    src: src.get(
      $name: $name,
      $weight: Thin,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin extralight() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 200;
    src: src.get(
      $name: $name,
      $weight: ExtraLight,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin light() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 300;
    src: src.get(
      $name: $name,
      $weight: Light,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin regular() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 400;
    src: src.get(
      $name: $name,
      $weight: Regular,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin text() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 450;
    src: src.get(
      $name: $name,
      $weight: Text,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin medium() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 500;
    src: src.get(
      $name: $name,
      $weight: Medium,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin semibold() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 500;
    src: src.get(
      $name: $name,
      $weight: SemiBold,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin bold() {
  @font-face {
    font-display: config.$font-display;
    font-family: $font-family;
    font-style: normal;
    font-weight: 500;
    src: src.get(
      $name: $name,
      $weight: Bold,
      $style: $styles,
      $formats: $formats,
      $package-name: $package-name
    );
  }
}

@mixin all() {
  @include thin();
  @include extralight();
  @include light();
  @include regular();
  @include text();
  @include medium();
  @include semibold();
  @include bold();
}

@mixin default() {
  @include light();
  @include regular();
  @include semibold();
}
