{ lib, ... }:

let
  mkColorOption = description: lib.mkOption {
    type = lib.types.str;
    inherit description;
  };
in
{
  options.local.theme = {
    bar = {
      background = mkColorOption "Background pane color";
      mainText = mkColorOption "Main text color";
      inactiveText = mkColorOption "Inactive text color";
    };
    window = {
      activeBorder = mkColorOption "Window active border color";
      inactiveBorder = mkColorOption "Window inactive border color";
      background = mkColorOption "Terminal background color";
      mainText = mkColorOption "Terminal main text color";
      cursorText = mkColorOption "Cursor text color";
      cursor = mkColorOption "Cursor background color";
      cursorVi = mkColorOption "Cursor Vi Mode background color";
      searchText = mkColorOption "Search text color";
      search = mkColorOption "Search match background";
      searchFocused = mkColorOption "Search focused match background";
      footerText = mkColorOption "Footer bar text color";
      footer = mkColorOption "Footer bar background color";
      hintsText = mkColorOption "Keyboard regex hints text color";
      hintsStart = mkColorOption "Keyboard regex hints start background color";
      hintsEnd = mkColorOption "Keyboard regex hints end background color";
      selectionText = mkColorOption "Selection text color";
      selection = mkColorOption "Selection background color";
      regular = {
        color0 = mkColorOption null;
        color1 = mkColorOption null;
        color2 = mkColorOption null;
        color3 = mkColorOption null;
        color4 = mkColorOption null;
        color5 = mkColorOption null;
        color6 = mkColorOption null;
        color7 = mkColorOption null;
      };
      bold = {
        color8 = mkColorOption null;
        color9 = mkColorOption null;
        color10 = mkColorOption null;
        color11 = mkColorOption null;
        color12 = mkColorOption null;
        color13 = mkColorOption null;
        color14 = mkColorOption null;
        color15 = mkColorOption null;
      };
      extended = {
        color16 = mkColorOption null;
        color17 = mkColorOption null;
        color18 = mkColorOption null;
        color19 = mkColorOption null;
      };
    };
    notification = {
      background = mkColorOption "Notification background color";
      summary = mkColorOption "Notification summary text color";
      body = mkColorOption "Notification body text color";
      appName = mkColorOption "Notification app name text color";
      lowBorder = mkColorOption "Notification low priority border color";
      normalBorder = mkColorOption "Notification normal priority border color";
      criticalBorder = mkColorOption "Notification critical priority border color";
      pausedBorder = mkColorOption "Notification paused border color";
    };
    highlights = {
      success = mkColorOption "Success color";
      warning = mkColorOption "Warnings color";
      error = mkColorOption "Errors color";
      critical = mkColorOption "Clitical color";
      link = mkColorOption "Links color";
      tags = mkColorOption "Search results, tags color";
    };
    syntax = {
      markText = mkColorOption "Text color for marked background";
      mark1 = mkColorOption "Marked color 1";
      mark2 = mkColorOption "Marked color 2";
      mark3 = mkColorOption "Marked color 3";
    };
  };
}
