@use 'sass:map';
@use '~@angular/material' as mat;

@mixin color($theme) {
  $config: mat.get-color-config($theme);
  $primary: map.get($config, primary);
  $accent: map.get($config, accent);
  $warn: map.get($config, warn);

  mtna-coach-mark-component {
    &.mtna-primary {
      .coach-mark-instructions {
        color: mat.get-color-from-palette($primary, default-contrast);
      }
      svg {
        fill: mat.get-color-from-palette($primary);
      }
    }
    &.mtna-accent {
      .coach-mark-instructions {
        color: mat.get-color-from-palette($accent, default-contrast);
      }
      svg {
        fill: mat.get-color-from-palette($accent);
      }
    }
    &.mtna-warn {
      .coach-mark-instructions {
        color: mat.get-color-from-palette($warn, default-contrast);
      }
      svg {
        fill: mat.get-color-from-palette($warn);
      }
    }
  }
}

@mixin typography($theme) {
}

@mixin theme($theme) {
  $config: mat.get-color-config($theme);
  @if $config != null {
    @include color($theme);
  }

  $typography-config: mat.get-typography-config($theme);
  @if $typography-config != null {
    @include typography($theme);
  }
}
