@use '@angular/material' as mat;

$custom-typography: mat.define-typography-config(
    $font-family: 'opensans',
);

// TODO(v15): As of v15 mat.legacy-core no longer includes default typography styles.
//  The following line adds:
//    1. Default typography styles for all components
//    2. Styles for typography hierarchy classes (e.g. .mat-headline-1)
//  If you specify typography styles for the components you use elsewhere, you should delete this line.
//  If you don't need the default component typographies but still want the hierarchy styles,
//  you can delete this line and instead use:
//    `@include mat.legacy-typography-hierarchy($custom-typography);`
@include mat.all-component-typographies($custom-typography);

@include mat.core();

$custom-palette: (
    50: var(--theme-accent-50),
    100: var(--theme-accent-color-100),
    200: var(--theme-accent-color-200),
    300: var(--theme-accent-color-300),
    400: var(--theme-accent-color-400),
    500: var(--theme-accent-color-500),
    600: var(--theme-accent-color-600),
    700: var(--theme-accent-color-700),
    800: var(--theme-accent-color-800),
    900: var(--theme-accent-color-900),
    A100: var(--theme-accent-color-A100),
    A200: var(--theme-accent-color-A200),
    A400: var(--theme-accent-color-A400),
    A700: var(--theme-accent-color-A700),
    contrast: (
        50: #000000,
        100: #000000,
        200: #000000,
        300: #000000,
        400: #000000,
        500: #ffffff,
        600: #ffffff,
        700: #ffffff,
        800: #ffffff,
        900: #ffffff,
        A100: #000000,
        A200: #000000,
        A400: #000000,
        A700: #000000,
    ),
);

$primary-palette: mat.define-palette($custom-palette);
$accent-palette: mat.define-palette($custom-palette);
$warn-palette: mat.define-palette($custom-palette);

$dark-theme: mat.define-dark-theme(
    (
        color: (
            primary: $primary-palette,
            accent: $accent-palette,
            warn: $warn-palette,
        ),
    )
);

$light-theme: mat.define-light-theme(
    (
        color: (
            primary: $primary-palette,
            accent: $accent-palette,
            warn: $warn-palette,
        ),
    )
);

@include mat.all-component-themes($dark-theme);

.default-theme-dark {
    @include mat.all-component-themes($dark-theme);
}

.default-theme-light {
    @include mat.all-component-themes($light-theme);
}
