{ config, ... }:

let

  # See: https://github.com/catppuccin/catppuccin
  # palettes
  rosewater = "#f2d5cf"; # Links, URLs
  flamingo = "#eebebe";
  pink = "#f4b8e4";
  mauve = "#ca9ee6"; # Mark 2
  red = "#e78284";
  maroon = "#ea999c"; # Errors
  peach = "#ef9f76"; # Warnings
  yellow = "#e5c890";
  green = "#a6d189"; # Success
  teal = "#81c8be";
  sky = "#99d1db";
  sapphire = "#85c1dc"; # Mark 3
  blue = "#8caaee"; # Search Results, tags
  lavender = "#babbf1"; # Mark 1
  # Foreground: Main Text, Body Copy
  text = "#c6d0f5";
  # Subtext: Secondary Text, Headlines, Labels
  subtext1 = "#b5bfe2";
  subtext0 = "#a5adce";
  # Overlays: Splits, Floating Elements
  overlay2 = "#949cbb";
  overlay1 = "#838ba7";
  overlay0 = "#737994"; # Subtle: Comments, Footnotes, Inactive Text
  # Surface Elements: Sign Columns, Cursor Line, Generic Buttons, Inputs
  surface2 = "#626880";
  surface1 = "#51576d";
  surface0 = "#414559";
  # Background Pane: main background pane
  base = "#303446";
  # Secondary Panes: Secondary Canvases, Content Boxes, Sidebars
  mantle = "#292c3c";
  crust = "#232634";
in
{
  config.local.theme = {
    bar = {
      background = mantle;
      mainText = text;
      inactiveText = overlay0;
    };
    window = {
      activeBorder = lavender;
      inactiveBorder = overlay0;
      background = base;
      mainText = text;
      cursorText = base;
      cursor = rosewater;
      cursorVi = lavender;
      searchText = base;
      search = subtext0;
      searchFocused = green;
      footerText = base;
      footer = subtext0;
      hintsText = base;
      hintsStart = yellow;
      hintsEnd = subtext0;
      selectionText = base;
      selection = rosewater;
      regular = {
        color0 = surface1;
        color1 = red;
        color2 = green;
        color3 = yellow;
        color4 = blue;
        color5 = pink;
        color6 = teal;
        color7 = subtext1;
      };
      bold = {
        color8 = surface2;
        color9 = red;
        color10 = green;
        color11 = yellow;
        color12 = blue;
        color13 = pink;
        color14 = teal;
        color15 = subtext0;
      };
      extended = {
        color16 = peach;
        color17 = rosewater;
        color18 = crust;
        color19 = mantle;
      };
    };
    notification = {
      background = mantle;
      summary = subtext0;
      body = text;
      appName = overlay0;
      lowBorder = lavender;
      normalBorder = teal;
      criticalBorder = red;
      pausedBorder = blue;
    };
    highlights = {
      success = green;
      warning = peach;
      error = maroon;
      critical = red;
      link = rosewater;
      tags = blue;
    };
    syntax = {
      markText = crust;
      mark1 = lavender;
      mark2 = mauve;
      mark3 = sapphire;
    };
  };
}
