/*
 * Copyright (C) 2024-2025 BIRU
 *
 * This file is part of Tenzu.
 *
 * Tenzu is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
 *
 * You can contact BIRU at ask@biru.sh
 *
 */

// This file was generated by running 'ng generate @angular/material:m3-theme'.
// Proceed with caution if making changes to this file.

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

// Note: Color palettes are generated from primary: #2a3c96, secondary: #fbc259, tertiary: #0eb188, neutral: #88959d
$_light_palettes: (
  primary: (
    0: #03050c,
    10: #070a18,
    20: #0e1330,
    25: #11183c,
    30: #141d48,
    35: #182254,
    40: #1b2660,
    50: #223078,
    60: #4e5993,
    70: #7f8ac0,
    80: #a7acc9,
    90: #d3d6e4,
    95: #e9eaf2,
    98: #f3f3f9,
    99: #f4f5fa,
    100: #f6f7fb,
  ),
  secondary: (
    0: #150e03,
    10: #211601,
    20: #533602,
    25: #6c4703,
    30: #855703,
    35: #9e6804,
    40: #b77804,
    50: #e89906,
    60: #fab027,
    70: #fbc259,
    80: #fcd48b,
    90: #fde7bd,
    95: #fef0d5,
    98: #fef5e4,
    99: #fef7e9,
    100: #fff9ee,
  ),
  tertiary: (
    0: #000c06,
    10: #03231b,
    20: #07523f,
    25: #086a52,
    30: #0a8264,
    35: #0c9976,
    40: #0eb188,
    50: #12e0ac,
    60: #36efc1,
    70: #65f3cf,
    80: #94f7de,
    90: #c4faed,
    95: #dbfcf4,
    98: #e9fdf8,
    99: #eefefa,
    100: #f3fefb,
  ),
  neutral: (
    0: #010101,
    5: #060706,
    10: #121413,
    15: #1e2221,
    20: #2a2f2e,
    25: #363d3b,
    30: #424a48,
    35: #4e5855,
    40: #5a6562,
    50: #72807c,
    60: #8c9995,
    70: #a7b1ae,
    80: #c2c9c7,
    90: #dde1e0,
    95: #ebedec,
    98: #f3f4f4,
    99: #f5f6f6,
    100: #fefefe,
    4: #030404,
    6: #080909,
    12: #191c1b,
    17: #252a28,
    22: #2f3433,
    24: #313736,
    87: #d5dad8,
    92: #e3e6e5,
    94: #e8eaea,
    96: #edefef
  ),
  neutral-variant: (
    0: #030605,
    10: #070909,
    20: #1c2726,
    25: #273535,
    30: #324443,
    35: #3d5352,
    40: #486160,
    50: #5d7f7d,
    60: #759a98,
    70: #93afae,
    80: #b0c5c4,
    90: #cddbda,
    95: #dce5e5,
    98: #e5ecec,
    99: #e8eeee,
    100: #ebf0f0
  ),
  error: (
    0: #110000,
    10: #2c0707,
    20: #580e0e,
    25: #6e1111,
    30: #851414,
    35: #9b1818,
    40: #b11b1b,
    50: #dd2222,
    60: #e44e4e,
    70: #eb7a7a,
    80: #f1a7a7,
    90: #f8d3d3,
    95: #fce9e9,
    98: #fef6f6,
    99: #fefbfb,
    100: #fffefe,
  ),
);

$_inverted_primary: ();
$_inverted_secondary: ();
$_inverted_tertiary: ();
$_inverted_neutral: ();
$_inverted_neutral-variant: ();
$_inverted_error: ();

@each $key, $value in map.get($_light_palettes, primary) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_primary: map.merge($_inverted_primary, $map);
}
@each $key, $value in map.get($_light_palettes, secondary) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_secondary: map.merge($_inverted_secondary, $map);
}
@each $key, $value in map.get($_light_palettes, tertiary) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_tertiary: map.merge($_inverted_tertiary, $map);
}
@each $key, $value in map.get($_light_palettes, neutral) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_neutral: map.merge($_inverted_neutral, $map);
}
@each $key, $value in map.get($_light_palettes, neutral-variant) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_neutral-variant: map.merge($_inverted_neutral-variant, $map);
}
@each $key, $value in map.get($_light_palettes, error) {
  $map: ();
  $map: map.merge($map, ($key: color.complement(color.invert($value))) );
  $_inverted_error: map.merge($_inverted_error, $map);
}

$_rest_light: (
  secondary: map.get($_light_palettes, secondary),
  neutral: map.get($_light_palettes, neutral),
  neutral-variant: map.get($_light_palettes, neutral-variant),
  error: map.get($_light_palettes, error),
);
$_primary_light: map.merge(map.get($_light_palettes, primary), $_rest_light);
$_tertiary_light: map.merge(map.get($_light_palettes, tertiary), $_rest_light);
$light-theme: mat.define-theme((
  color: (
    theme-type: light,
    primary: $_primary_light,
    tertiary: $_tertiary_light,
  ),
  typography: (
    plain-family: 'Lexend',
  ),
));

$_rest_dark: (
  secondary: $_inverted_secondary,
  neutral: $_inverted_neutral,
  neutral-variant: $_inverted_neutral-variant,
  error: $_inverted_error,
);
$_primary_dark: map.merge($_inverted_primary, $_rest_dark);
$_tertiary_dark: map.merge($_inverted_tertiary, $_rest_dark);
$dark-theme: mat.define-theme((
  color: (
    theme-type: dark,
    primary: $_primary_dark,
    tertiary: $_tertiary_dark,
  ),
  typography: (
    plain-family: 'Lexend',
  ),
));
