@import "../../../../../node_modules/bootstrap/scss/functions";
@import "../../../../../node_modules/bootstrap/scss/variables";
@import "../../../../../node_modules/bootstrap/scss/maps";
@import "../../../../../node_modules/bootstrap/scss/mixins";
@import "../../../../../node_modules/bootstrap/scss/utilities";

/*=========================
=   Admin color palette   =
=========================*/

$primary-100: tint-color($primary, 80%);
$primary-200: tint-color($primary, 60%);
$primary-300: tint-color($primary, 40%);
$primary-400: tint-color($primary, 20%);
$primary-500: $primary;
$primary-600: shade-color($primary, 20%);
$primary-700: shade-color($primary, 40%);
$primary-800: shade-color($primary, 60%);
$primary-900: shade-color($primary, 80%);

$secondary-100: tint-color($secondary, 80%);
$secondary-200: tint-color($secondary, 60%);
$secondary-300: tint-color($secondary, 40%);
$secondary-400: tint-color($secondary, 20%);
$secondary-500: $secondary;
$secondary-600: shade-color($secondary, 20%);
$secondary-700: shade-color($secondary, 40%);
$secondary-800: shade-color($secondary, 60%);
$secondary-900: shade-color($secondary, 80%);

$success-100: tint-color($success, 80%);
$success-200: tint-color($success, 60%);
$success-300: tint-color($success, 40%);
$success-400: tint-color($success, 20%);
$success-500: $success;
$success-600: shade-color($success, 20%);
$success-700: shade-color($success, 40%);
$success-800: shade-color($success, 60%);
$success-900: shade-color($success, 80%);

$info-100: tint-color($info, 80%);
$info-200: tint-color($info, 60%);
$info-300: tint-color($info, 40%);
$info-400: tint-color($info, 20%);
$info-500: $info;
$info-600: shade-color($info, 20%);
$info-700: shade-color($info, 40%);
$info-800: shade-color($info, 60%);
$info-900: shade-color($info, 80%);

$warning-100: tint-color($warning, 80%);
$warning-200: tint-color($warning, 60%);
$warning-300: tint-color($warning, 40%);
$warning-400: tint-color($warning, 20%);
$warning-500: $warning;
$warning-600: shade-color($warning, 20%);
$warning-700: shade-color($warning, 40%);
$warning-800: shade-color($warning, 60%);
$warning-900: shade-color($warning, 80%);

$danger-100: tint-color($danger, 80%);
$danger-200: tint-color($danger, 60%);
$danger-300: tint-color($danger, 40%);
$danger-400: tint-color($danger, 20%);
$danger-500: $danger;
$danger-600: shade-color($danger, 20%);
$danger-700: shade-color($danger, 40%);
$danger-800: shade-color($danger, 60%);
$danger-900: shade-color($danger, 80%);

$light-100: tint-color($light, 80%);
$light-200: tint-color($light, 60%);
$light-300: tint-color($light, 40%);
$light-400: tint-color($light, 20%);
$light-500: $light;
$light-600: shade-color($light, 20%);
$light-700: shade-color($light, 40%);
$light-800: shade-color($light, 60%);
$light-900: shade-color($light, 80%);

$dark-100: tint-color($dark, 80%);
$dark-200: tint-color($dark, 60%);
$dark-300: tint-color($dark, 40%);
$dark-400: tint-color($dark, 20%);
$dark-500: $dark;
$dark-600: shade-color($dark, 20%);
$dark-700: shade-color($dark, 40%);
$dark-800: shade-color($dark, 60%);
$dark-900: shade-color($dark, 80%);

$primary-palette: (
  "primary-100": $primary-100,
  "primary-200": $primary-200,
  "primary-300": $primary-300,
  "primary-400": $primary-400,
  "primary-500": $primary-500,
  "primary-600": $primary-600,
  "primary-700": $primary-700,
  "primary-800": $primary-800,
  "primary-900": $primary-900
);

$secondary-palette: (
  "secondary-100": $secondary-100,
  "secondary-200": $secondary-200,
  "secondary-300": $secondary-300,
  "secondary-400": $secondary-400,
  "secondary-500": $secondary-500,
  "secondary-600": $secondary-600,
  "secondary-700": $secondary-700,
  "secondary-800": $secondary-800,
  "secondary-900": $secondary-900
);

$success-palette: (
  "success-100": $success-100,
  "success-200": $success-200,
  "success-300": $success-300,
  "success-400": $success-400,
  "success-500": $success-500,
  "success-600": $success-600,
  "success-700": $success-700,
  "success-800": $success-800,
  "success-900": $success-900
);

$info-palette: (
  "info-100": $info-100,
  "info-200": $info-200,
  "info-300": $info-300,
  "info-400": $info-400,
  "info-500": $info-500,
  "info-600": $info-600,
  "info-700": $info-700,
  "info-800": $info-800,
  "info-900": $info-900
);

$warning-palette: (
  "warning-100": $warning-100,
  "warning-200": $warning-200,
  "warning-300": $warning-300,
  "warning-400": $warning-400,
  "warning-500": $warning-500,
  "warning-600": $warning-600,
  "warning-700": $warning-700,
  "warning-800": $warning-800,
  "warning-900": $warning-900
);

$danger-palette: (
  "danger-100": $danger-100,
  "danger-200": $danger-200,
  "danger-300": $danger-300,
  "danger-400": $danger-400,
  "danger-500": $danger-500,
  "danger-600": $danger-600,
  "danger-700": $danger-700,
  "danger-800": $danger-800,
  "danger-900": $danger-900
);

$light-palette: (
  "light-100": $light-100,
  "light-200": $light-200,
  "light-300": $light-300,
  "light-400": $light-400,
  "light-500": $light-500,
  "light-600": $light-600,
  "light-700": $light-700,
  "light-800": $light-800,
  "light-900": $light-900
);

$dark-palette: (
  "dark-100": $dark-100,
  "dark-200": $dark-200,
  "dark-300": $dark-300,
  "dark-400": $dark-400,
  "dark-500": $dark-500,
  "dark-600": $dark-600,
  "dark-700": $dark-700,
  "dark-800": $dark-800,
  "dark-900": $dark-900
);

$theme-palette: map-merge-multiple(
    $primary-palette,
    $secondary-palette,
    $success-palette,
    $info-palette,
    $warning-palette,
    $danger-palette,
    $light-palette,
    $dark-palette
);

// @debug $theme-palette;

$utilities: map-merge(
    $utilities,
    (
        "color":
            map-merge(
                map-get($utilities, "color"),
                (
                    values:
                        map-merge(map-get(map-get($utilities, "color"), "values"), (map-merge-multiple($theme-palette))),
                )
            ),
    )
);

@each $color, $value in $theme-palette {
    $color-rgb: to-rgb($value);
    .text-bg-#{$color} {
        color: color-contrast($value) if($enable-important-utilities, !important, null);
        background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1))
            if($enable-important-utilities, !important, null);
    }
    .bg-#{$color} {
        background-color: RGBA($color-rgb, var(--#{$prefix}bg-opacity, 1))
            if($enable-important-utilities, !important, null);
    }
}

@import "../../../../../node_modules/bootstrap/scss/utilities/api";