/**
Material Design theme for vanilla ng material components
 */

// Material theming definitions
@import '@angular/material/theming';

// Typography
@if $import-md-font == true {
  @import url($md-font-family-url);
}
$mat-custom-font: mat-typography-config($font-family: $md-font-family);

// Build theme
@include mat-core($mat-custom-font);

$mat-theme-primary: (
  100: lighten($theme-color-primary, 15%), // lighter
  500: $theme-color-primary, // default
  700: darken($theme-color-primary, 15%), // darker
  contrast: (
          100: black,
          500: black,
          700: black
  )
);

$mat-theme-accent: (
  100: lighten($theme-color-secondary, 15%), // lighter
  500: $theme-color-secondary, // default
  700: darken($theme-color-secondary, 15%), // darker
  contrast: (
          100: white,
          500: white,
          700: white
  )
);

$mat-theme-warn: (
  100: lighten($theme-color-warn, 15%), // lighter
  500: $theme-color-warn, // default
  700: darken($theme-color-warn, 15%), // darker
  contrast: (
          100: white,
          500: white,
          700: white
  )
);

$app-primary: mat-palette($mat-theme-primary);
$app-accent: mat-palette($mat-theme-accent);
$app-warn: mat-palette($mat-theme-warn);

// Dark theme switch
$app-theme: null;
@if $use-md-dark-theme == true {
  $app-theme: mat-dark-theme($app-primary, $app-accent, $app-warn);
} @else {
  $app-theme: mat-light-theme($app-primary, $app-accent, $app-warn);
}

@include angular-material-theme($app-theme);
