@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);

  .cdk-overlay-pane {
    &.mtna-primary {
      mtna-feature-discovery {
        .instructions {
          color: mat.get-contrast-color-from-palette($primary, 500);
        }
        .feature-discovery-svg {
          fill: mat.get-color-from-palette($primary);
        }
      }
    }
    &.mtna-accent {
      mtna-feature-discovery {
        .instructions {
          color: mat.get-contrast-color-from-palette($accent, 500);
        }
        .feature-discovery-svg {
          fill: mat.get-color-from-palette($accent);
        }
      }
    }
    &.mtna-warn {
      mtna-feature-discovery {
        .instructions {
          color: mat.get-contrast-color-from-palette($warn, 500);
        }
        .feature-discovery-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);
  }
}
