/*------------------Defining Colorschemes-------------------*/
@import "colorschemes/latte.scss";
@import "colorschemes/rosepine-light.scss";
@import "colorschemes/frappe.scss";
@import "colorschemes/macchiato.scss";
@import "colorschemes/mocha.scss";
@import "colorschemes/mocha-old.scss";
$theme-list: $theme-latte, $theme-rosepine-light, $theme-frappe, $theme-macchiato, $theme-mocha, $theme-mocha-old;
$color-list: "rosewater", "flamingo", "pink", "mauve", "red", "maroon", "peach", "yellow", "green", "teal", "sky", "sapphire", "blue", "lavender", "text", "subtext1", "subtext0", "overlay2", "overlay1", "overlay0", "surface2", "surface1", "surface0", "base", "mantle", "crust";

@each $theme-name in $theme-list {
  .theme-#{map-get($theme-name, theme-mode)}.ctp-#{map-get($theme-name, theme-name)}, .ctp-#{map-get($theme-name, theme-name)} .themed-color-wrapper > .theme-#{map-get($theme-name, theme-mode)} {
    @each $color-name in $color-list {
      --ctp-#{$color-name}: var(--ctp-custom-#{$color-name}, var(--ctp-ext-#{$color-name}, #{red(map-get($theme-name, ctp-#{$color-name}))}, #{green(map-get($theme-name, ctp-#{$color-name}))}, #{blue(map-get($theme-name, ctp-#{$color-name}))}));
    }
  }
}
.theme-dark {
  @each $color-name in $color-list {
    --ctp-#{$color-name}: var(--ctp-custom-#{$color-name}, var(--ctp-ext-#{$color-name}, #{red(map-get($theme-mocha, ctp-#{$color-name}))}, #{green(map-get($theme-mocha, ctp-#{$color-name}))}, #{blue(map-get($theme-mocha, ctp-#{$color-name}))}));
  }
}
.theme-light {
  @each $color-name in $color-list {
    --ctp-#{$color-name}: var(--ctp-custom-#{$color-name}, var(--ctp-ext-#{$color-name}, #{red(map-get($theme-latte, ctp-#{$color-name}))}, #{green(map-get($theme-latte, ctp-#{$color-name}))}, #{blue(map-get($theme-latte, ctp-#{$color-name}))}));
  }
}
