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

@mixin color($theme) {
  $config: mat.get-color-config($theme);
  $foreground: map.get($config, foreground);
  $background: map.get($config, background);
  $text: mat.get-color-from-palette($foreground, text);
  $divider: mat.get-color-from-palette($foreground, divider);
  $card: mat.get-color-from-palette($foreground, card);

  mtna-select-search {
    color: $text;
    .mtna-select-search-inner {
      border-bottom-color: $divider;
      background-color: $card;
    }
  }
}

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