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

  mtna-task-bottom-sheet.mat-primary {
    @include _task-bottom-sheet-palette($primary);
  }
  mtna-task-bottom-sheet.mat-accent {
    @include _task-bottom-sheet-palette($accent);
  }
}

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

@mixin _task-bottom-sheet-palette($mainPalette) {
  header {
    background: mat.get-color-from-palette($mainPalette, 500);
    color: mat.get-contrast-color-from-palette($mainPalette, 500);
  }
}
