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

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

  $slider-off: mat.get-color-from-palette($foreground, slider-off);
  $disabled-button: mat.get-color-from-palette($background, disabled-button);

  .mat-chip.rds-c-chip,
  .rds-c-chip {
    background-color: $disabled-button;
    border-color: $slider-off;
    color: mat.get-color-from-palette($foreground, text);
  }
}

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