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

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

  rds-c-data-product-banner {
    .data-product-banner {
      background-color: mat.get-color-from-palette($primary, default);
      color: mat.get-color-from-palette($primary, default-contrast);
      p a {
        color: mat.get-color-from-palette($primary, default-contrast);
      }
    }
  }
}

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