pragma Singleton

import Quickshell
import Quickshell.Io
import QtQuick
import ZShell.Config

Singleton {
	id: root

	readonly property JsonObject schemes: JsonObject {
		readonly property Scheme oneDark: Scheme {
			comment: "#5c6370"
			string: "#98c379"
			stringKey: "#e06c75"
			number: "#d19a66"
			keyword: "#c678dd"
			type: "#e5c07b"
			functions: "#61afef"
			method: "#61afef"
			macro: "#98c379"
			preproc: "#abb2bf"
			operator: "#abb2bf"
			property: "#abb2bf"
			label: "#e06c75"
			attribute: "#d19a66"
			bg: "#282c34"
			normal: "#abb2bf"
		}
		readonly property Scheme nord: Scheme {
			comment: "#4c566a"
			string: "#a3be8c"
			stringKey: "#ebcb8b"
			number: "#b48ead"
			keyword: "#81a1c1"
			type: "#8fbcbb"
			functions: "#88c0d0"
			method: "#88c0d0"
			macro: "#5e81ac"
			preproc: "#5e81ac"
			operator: "#81a1c1"
			property: "#d8dee9"
			label: "#d08770"
			attribute: "#d8dee9"
			bg: "#2e3440"
			normal: "#d8dee9"
		}
		readonly property Scheme dracula: Scheme {
			comment: "#6272a4"
			string: "#f1fa8c"
			stringKey: "#f8f8f2"
			number: "#ffb86c"
			keyword: "#ff79c6"
			type: "#8be9fd"
			functions: "#50fa7b"
			method: "#50fa7b"
			macro: "#ff79c6"
			preproc: "#ff79c6"
			operator: "#f8f8f2"
			property: "#f8f8f2"
			label: "#6272a4"
			attribute: "#8be9fd"
			bg: "#282a36"
			normal: "#f8f8f2"
		}
		readonly property Scheme githubDark: Scheme {
			comment: "#8b949e"
			string: "#a5d6ff"
			stringKey: "#79c0ff"
			number: "#79c0ff"
			keyword: "#ff7b72"
			type: "#ffa657"
			functions: "#d2a8ff"
			method: "#d2a8ff"
			macro: "#ff7b72"
			preproc: "#79c0ff"
			operator: "#ff7b72"
			property: "#79c0ff"
			label: "#7ee787"
			attribute: "#7ee787"
			bg: "#0d1117"
			normal: "#c9d1d9"
		}
		readonly property Scheme solarizedDark: Scheme {
			comment: "#586e75"
			string: "#2aa198"
			stringKey: "#268bd2"
			number: "#2aa198"
			keyword: "#859900"
			type: "#b58900"
			functions: "#268bd2"
			method: "#268bd2"
			macro: "#cb4b16"
			preproc: "#cb4b16"
			operator: "#859900"
			property: "#268bd2"
			label: "#6c71c4"
			attribute: "#657b83"
			bg: "#002b36"
			normal: "#839496"
		}
		readonly property Scheme monokai: Scheme {
			comment: "#75715e"
			string: "#e6db74"
			stringKey: "#f8f8f2"
			number: "#ae81ff"
			keyword: "#f92672"
			type: "#a6e22e"
			functions: "#a6e22e"
			method: "#a6e22e"
			macro: "#a6e22e"
			preproc: "#f92672"
			operator: "#f92672"
			property: "#fda5ff"
			label: "#f92672"
			attribute: "#a6e22e"
			bg: "#272822"
			normal: "#f8f8f2"
		}
		readonly property Scheme gruvboxDark: Scheme {
			comment: "#928374"
			string: "#b8bb26"
			stringKey: "#ebdbb2"
			number: "#d3869b"
			keyword: "#fb4934"
			type: "#fabd2f"
			functions: "#b8bb26"
			method: "#b8bb26"
			macro: "#8ec07c"
			preproc: "#8ec07c"
			operator: "#ebdbb2"
			property: "#83a598"
			label: "#fb4934"
			attribute: "#8ec07c"
			bg: "#1d2021"
			normal: "#ebdbb2"
		}
		readonly property Scheme catppuccinMocha: Scheme {
			comment: "#9399b2"
			string: "#a6e3a1"
			stringKey: "#b4befe"
			number: "#fab387"
			keyword: "#cba6f7"
			type: "#f9e2af"
			functions: "#89b4fa"
			method: "#89b4fa"
			macro: "#cba6f7"
			preproc: "#f5c2e7"
			operator: "#89dceb"
			property: "#b4befe"
			label: "#74c7ec"
			attribute: "#f9e2af"
			bg: "#1e1e2e"
			normal: "#cdd6f4"
		}
		readonly property Scheme tokyoNight: Scheme {
			comment: "#565f89"
			string: "#9ece6a"
			stringKey: "#73daca"
			number: "#ff9e64"
			keyword: "#9d7cd8"
			type: "#2ac3de"
			functions: "#7aa2f7"
			method: "#7aa2f7"
			macro: "#7dcfff"
			preproc: "#7dcfff"
			operator: "#89ddff"
			property: "#73daca"
			label: "#7aa2f7"
			attribute: "#73daca"
			bg: "#1a1b26"
			normal: "#c0caf5"
		}
		readonly property Scheme ayuDark: Scheme {
			comment: "#5a6673"
			string: "#aad94c"
			stringKey: "#aad94c"
			number: "#d2a6ff"
			keyword: "#ff8f40"
			type: "#59c2ff"
			functions: "#ffb454"
			method: "#ffb454"
			macro: "#59c2ff"
			preproc: "#ff8f40"
			operator: "#f29668"
			property: "#f07178"
			label: "#59c2ff"
			attribute: "#ffb454"
			bg: "#0a0e14"
			normal: "#bfbdb6"
		}
		readonly property Scheme palenight: Scheme {
			comment: "#697098"
			string: "#c3e88d"
			stringKey: "#82b1ff"
			number: "#f78c6c"
			keyword: "#ff5370"
			type: "#ffcb6b"
			functions: "#82b1ff"
			method: "#82b1ff"
			macro: "#c792ea"
			preproc: "#ffcb6b"
			operator: "#89ddff"
			property: "#c3e88d"
			label: "#c792ea"
			attribute: "#ffcb6b"
			bg: "#292d3e"
			normal: "#bfc7d5"
		}
	}
	readonly property var active: schemes[Config.llm.appearance.scheme]

	component Scheme: JsonObject {
		property color comment: "#697098"
		property color string: "#c3e88d"
		property color stringKey: "#82b1ff"
		property color number: "#f78c6c"
		property color keyword: "#ff5370"
		property color type: "#ffcb6b"
		property color functions: "#82b1ff"
		property color method: "#82b1ff"
		property color macro: "#c792ea"
		property color preproc: "#ffcb6b"
		property color operator: "#89ddff"
		property color property: "#c3e88d"
		property color label: "#c792ea"
		property color attribute: "#ffcb6b"
		property color bg: "#292d3e"
		property color normal: "#bfc7d5"
	}
}
