@use '@angular/material' as mat;
@use "./color-palette" as color-palette;
@use "./variables" as variables;

// Custom Theming for Angular Material
// For more information: https://material.angular.io/guide/theming
// Plus imports for other components in your app.

// Include the common styles for Angular Material. We include this here so that you only
// have to load a single css file for Angular Material in your app.
// Be sure that you only ever include this mixin once!
@include mat.elevation-classes();
@include mat.app-background();

// **** sgh common ui theme start ****

// Define the palettes for your theme using the Material Design palettes available in palette.scss
// (imported above). For each palette, you can optionally specify a default, lighter, and darker
// hue. Available color palettes: https://material.io/design/color/
$sgh-common-ui-primary: mat.m2-define-palette(color-palette.$sgh-color-palette);
$sgh-common-ui-accent: mat.m2-define-palette(color-palette.$sgh-color-palette, 400, A100, A400);

// The warn palette is optional (defaults to red).
$sgh-common-ui-warn: mat.m2-define-palette(mat.$m2-red-palette);

// Define a custom typography config that overrides the font-family as well as the
$sgh-common-ui-typography: mat.m2-define-typography-config(
  $font-family: variables.$sgh-font-family-primary,
  $headline-1: mat.m2-define-typography-level(60px, 70px, 300, variables.$sgh-font-family-primary, 0.0075em),
  $headline-2: mat.m2-define-typography-level(50px, 60px, 300, variables.$sgh-font-family-primary, 0.0000em),
  $headline-3: mat.m2-define-typography-level(30px, 60px, 300, variables.$sgh-font-family-primary, 0.0000em),
  $headline-4: mat.m2-define-typography-level(24px, 60px, 300, variables.$sgh-font-family-primary, 0.0000em),
  $headline-5: mat.m2-define-typography-level(20px, 60px, 300, variables.$sgh-font-family-primary, 0.0000em),
  $headline-6: mat.m2-define-typography-level(18px, 60px, 300, variables.$sgh-font-family-primary, 0.0000em),
  $subtitle-1: mat.m2-define-typography-level(14px, 18px, normal, variables.$sgh-font-family-primary, 0.0000em),
  $subtitle-2: mat.m2-define-typography-level(16px, 18px, 500, variables.$sgh-font-family-primary, 0.0094em),
  $body-1: mat.m2-define-typography-level(14px, 16px, normal, variables.$sgh-font-family-primary, 0.0179em),
  $body-2: mat.m2-define-typography-level(14px, 18px, normal, variables.$sgh-font-family-primary, 0.0179em),
  $caption: mat.m2-define-typography-level(11px, 20px, normal, variables.$sgh-font-family-primary, 0.0333em),
  $button: mat.m2-define-typography-level(14px, 16px, 500, variables.$sgh-font-family-primary, 0.0893em),
  $overline: null,
);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$sgh-common-ui-theme: mat.m2-define-light-theme((
  color: (
    primary: $sgh-common-ui-primary,
    accent: $sgh-common-ui-accent,
    warn: $sgh-common-ui-warn,
  ),
  typography: $sgh-common-ui-typography
));

// Include theme styles for core and each component used in your app.
// Alternatively, you can import and @include the theme mixins for each component
// that you are using.
@include mat.all-component-themes($sgh-common-ui-theme);

// **** sgh common ui theme end ****

// **** sgh blue theme start ****

$sgh-blue-primary: mat.m2-define-palette(color-palette.$sgh-blue-palette);
$sgh-blue-accent: mat.m2-define-palette(mat.$m2-light-blue-palette, A200, A100, A400);

// The warn palette is optional (defaults to red).
$sgh-blue-warn: mat.m2-define-palette(mat.$m2-red-palette);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$sgh-blue-theme: mat.m2-define-light-theme((
  color: (
    primary: $sgh-blue-primary,
    accent: $sgh-blue-accent,
    warn: $sgh-blue-warn,
  ),
  typography: $sgh-common-ui-typography
));

.sgh-blue-theme {
  @include mat.all-component-colors($sgh-blue-theme);
}

// **** sgh blue theme end ****

// **** sgh light theme start ****

$sgh-light-primary: mat.m2-define-palette(mat.$m2-blue-palette);
$sgh-light-accent: mat.m2-define-palette(mat.$m2-indigo-palette, A200, A100, A400);

// The warn palette is optional (defaults to red).
$sgh-light-warn: mat.m2-define-palette(mat.$m2-red-palette);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$sgh-light-theme: mat.m2-define-light-theme((
  color: (
    primary: $sgh-light-primary,
    accent: $sgh-light-accent,
    warn: $sgh-light-warn,
  ),
  typography: $sgh-common-ui-typography
));

.sgh-light-theme {
  @include mat.all-component-colors($sgh-light-theme);
}

// **** sgh light theme end ****


// **** sgh dark theme start ****

$sgh-dark-primary: mat.m2-define-palette(color-palette.$sgh-white-palette);
$sgh-dark-accent: mat.m2-define-palette(mat.$m2-grey-palette, A200, A100, A400);

// The warn palette is optional (defaults to red).
$sgh-dark-warn: mat.m2-define-palette(mat.$m2-red-palette);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$sgh-dark-theme: mat.m2-define-light-theme((
  color: (
    primary: $sgh-dark-primary,
    accent: $sgh-dark-accent,
    warn: $sgh-dark-warn,
  ),
  typography: $sgh-common-ui-typography
));

.sgh-dark-theme {
  @include mat.all-component-colors($sgh-dark-theme);
}

// **** sgh dark theme end ****

// **** natera theme start ****

$natera-primary: mat.m2-define-palette(color-palette.$natera-blue-palette);
$natera-accent: mat.m2-define-palette(color-palette.$natera-lightblue-palette, 500, A100, A400);

// The warn palette is optional (defaults to red).
$natera-warn: mat.m2-define-palette(mat.$m2-red-palette);

// Create the theme object. A theme consists of configurations for individual
// theming systems such as "color" or "typography".
$natera-theme: mat.m2-define-light-theme((
  color: (
    primary: $natera-primary,
    accent: $natera-accent,
    warn: $natera-warn,
  ),
  typography: $sgh-common-ui-typography
));

.natera-theme {
  @include mat.all-component-colors($natera-theme);
}

// **** sgh blue theme end ****

// define typography hierarchy
@include mat.typography-hierarchy($sgh-common-ui-typography);
