@use 'sass:map';
@use '~@angular/material' as mat;
@use './filter-select-theme';

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

  mtna-facet-filter {
    .facet-filter-row {
      &.unselected {
        color: map-get($foreground, secondary-text);
      }
      &:hover {
        background: map-get($background, hover);
      }
    }

    .facet-filter-toggle,
    .facet-filter-only {
      color: mat.get-color-from-palette($foreground, text);
    }
    @include filter-select-theme.theme($theme);
  }
}

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