// Stock theme definitions for DankMaterialShell
// Separated from Theme.qml to keep that file clean

const StockThemes = {
    DARK: {
        blue: {
            name: "Blue",
            primary: "#42a5f5",
            primaryText: "#ffffff",
            primaryContainer: "#1976d2",
            secondary: "#8ab4f8",
            surface: "#1a1c1e",
            surfaceText: "#e3e8ef",
            surfaceVariant: "#44464f",
            surfaceVariantText: "#c4c7c5",
            surfaceTint: "#8ab4f8",
            background: "#1a1c1e",
            backgroundText: "#e3e8ef",
            outline: "#8e918f",
            surfaceContainer: "#1e2023",
            surfaceContainerHigh: "#292b2f"
        },
        deepBlue: {
            name: "Deep Blue",
            primary: "#0061a4",
            primaryText: "#ffffff",
            primaryContainer: "#004881",
            secondary: "#42a5f5",
            surface: "#1a1c1e",
            surfaceText: "#e3e8ef",
            surfaceVariant: "#44464f",
            surfaceVariantText: "#c4c7c5",
            surfaceTint: "#8ab4f8",
            background: "#1a1c1e",
            backgroundText: "#e3e8ef",
            outline: "#8e918f",
            surfaceContainer: "#1e2023",
            surfaceContainerHigh: "#292b2f"
        },
        purple: {
            name: "Purple",
            primary: "#D0BCFF",
            primaryText: "#381E72",
            primaryContainer: "#4F378B",
            secondary: "#CCC2DC",
            surface: "#10121E",
            surfaceText: "#E6E0E9",
            surfaceVariant: "#49454F",
            surfaceVariantText: "#CAC4D0",
            surfaceTint: "#D0BCFF",
            background: "#10121E",
            backgroundText: "#E6E0E9",
            outline: "#938F99",
            surfaceContainer: "#1D1B20",
            surfaceContainerHigh: "#2B2930"
        },
        green: {
            name: "Green",
            primary: "#4caf50",
            primaryText: "#ffffff",
            primaryContainer: "#388e3c",
            secondary: "#81c995",
            surface: "#0f1411",
            surfaceText: "#e1f5e3",
            surfaceVariant: "#404943",
            surfaceVariantText: "#c1cbc4",
            surfaceTint: "#81c995",
            background: "#0f1411",
            backgroundText: "#e1f5e3",
            outline: "#8b938c",
            surfaceContainer: "#1a1f1b",
            surfaceContainerHigh: "#252a26"
        },
        orange: {
            name: "Orange",
            primary: "#ff6d00",
            primaryText: "#ffffff",
            primaryContainer: "#e65100",
            secondary: "#ffb74d",
            surface: "#1c1410",
            surfaceText: "#f5f1ea",
            surfaceVariant: "#4a453a",
            surfaceVariantText: "#cbc5b8",
            surfaceTint: "#ffb74d",
            background: "#1c1410",
            backgroundText: "#f5f1ea",
            outline: "#958f84",
            surfaceContainer: "#211e17",
            surfaceContainerHigh: "#2c291f"
        },
        red: {
            name: "Red",
            primary: "#f44336",
            primaryText: "#ffffff",
            primaryContainer: "#d32f2f",
            secondary: "#f28b82",
            surface: "#1c1011",
            surfaceText: "#f5e8ea",
            surfaceVariant: "#4a3f41",
            surfaceVariantText: "#cbc2c4",
            surfaceTint: "#f28b82",
            background: "#1c1011",
            backgroundText: "#f5e8ea",
            outline: "#958b8d",
            surfaceContainer: "#211b1c",
            surfaceContainerHigh: "#2c2426"
        },
        cyan: {
            name: "Cyan",
            primary: "#00bcd4",
            primaryText: "#ffffff",
            primaryContainer: "#0097a7",
            secondary: "#4dd0e1",
            surface: "#0f1617",
            surfaceText: "#e8f4f5",
            surfaceVariant: "#3f474a",
            surfaceVariantText: "#c2c9cb",
            surfaceTint: "#4dd0e1",
            background: "#0f1617",
            backgroundText: "#e8f4f5",
            outline: "#8c9194",
            surfaceContainer: "#1a1f20",
            surfaceContainerHigh: "#252b2c"
        },
        pink: {
            name: "Pink",
            primary: "#e91e63",
            primaryText: "#ffffff",
            primaryContainer: "#c2185b",
            secondary: "#f8bbd9",
            surface: "#1a1014",
            surfaceText: "#f3e8ee",
            surfaceVariant: "#483f45",
            surfaceVariantText: "#c9c2c7",
            surfaceTint: "#f8bbd9",
            background: "#1a1014",
            backgroundText: "#f3e8ee",
            outline: "#938a90",
            surfaceContainer: "#1f1b1e",
            surfaceContainerHigh: "#2a2428"
        },
        amber: {
            name: "Amber",
            primary: "#ffc107",
            primaryText: "#000000",
            primaryContainer: "#ff8f00",
            secondary: "#ffd54f",
            surface: "#1a1710",
            surfaceText: "#f3f0e8",
            surfaceVariant: "#49453a",
            surfaceVariantText: "#cac5b8",
            surfaceTint: "#ffd54f",
            background: "#1a1710",
            backgroundText: "#f3f0e8",
            outline: "#949084",
            surfaceContainer: "#1f1e17",
            surfaceContainerHigh: "#2a281f"
        },
        coral: {
            name: "Coral",
            primary: "#ffb4ab",
            primaryText: "#5f1412",
            primaryContainer: "#8c1d18",
            secondary: "#f9dedc",
            surface: "#1a1110",
            surfaceText: "#f1e8e7",
            surfaceVariant: "#4a4142",
            surfaceVariantText: "#cdc2c1",
            surfaceTint: "#ffb4ab",
            background: "#1a1110",
            backgroundText: "#f1e8e7",
            outline: "#968b8a",
            surfaceContainer: "#201a19",
            surfaceContainerHigh: "#2b2221"
        }
    },
    LIGHT: {
        blue: {
            name: "Blue Light",
            primary: "#1976d2",
            primaryText: "#ffffff",
            primaryContainer: "#e3f2fd",
            secondary: "#42a5f5",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#1976d2",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        deepBlue: {
            name: "Deep Blue Light",
            primary: "#0061a4",
            primaryText: "#ffffff",
            primaryContainer: "#cfe5ff",
            secondary: "#1976d2",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#0061a4",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        purple: {
            name: "Purple Light",
            primary: "#6750A4",
            primaryText: "#ffffff",
            primaryContainer: "#EADDFF",
            secondary: "#625B71",
            surface: "#FFFBFE",
            surfaceText: "#1C1B1F",
            surfaceVariant: "#E7E0EC",
            surfaceVariantText: "#49454F",
            surfaceTint: "#6750A4",
            background: "#FFFBFE",
            backgroundText: "#1C1B1F",
            outline: "#79747E",
            surfaceContainer: "#F3EDF7",
            surfaceContainerHigh: "#ECE6F0"
        },
        green: {
            name: "Green Light",
            primary: "#2e7d32",
            primaryText: "#ffffff",
            primaryContainer: "#e8f5e8",
            secondary: "#4caf50",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#2e7d32",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        orange: {
            name: "Orange Light",
            primary: "#e65100",
            primaryText: "#ffffff",
            primaryContainer: "#ffecb3",
            secondary: "#ff9800",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#e65100",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        red: {
            name: "Red Light",
            primary: "#d32f2f",
            primaryText: "#ffffff",
            primaryContainer: "#ffebee",
            secondary: "#f44336",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#d32f2f",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        cyan: {
            name: "Cyan Light",
            primary: "#0097a7",
            primaryText: "#ffffff",
            primaryContainer: "#e0f2f1",
            secondary: "#00bcd4",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#0097a7",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        pink: {
            name: "Pink Light",
            primary: "#c2185b",
            primaryText: "#ffffff",
            primaryContainer: "#fce4ec",
            secondary: "#e91e63",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#c2185b",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        amber: {
            name: "Amber Light",
            primary: "#ff8f00",
            primaryText: "#000000",
            primaryContainer: "#fff8e1",
            secondary: "#ffc107",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#ff8f00",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        },
        coral: {
            name: "Coral Light",
            primary: "#8c1d18",
            primaryText: "#ffffff",
            primaryContainer: "#ffdad6",
            secondary: "#ff5449",
            surface: "#fefefe",
            surfaceText: "#1a1c1e",
            surfaceVariant: "#e7e0ec",
            surfaceVariantText: "#49454f",
            surfaceTint: "#8c1d18",
            background: "#fefefe",
            backgroundText: "#1a1c1e",
            outline: "#79747e",
            surfaceContainer: "#f3f3f3",
            surfaceContainerHigh: "#ececec"
        }
    }
}

const ThemeNames = {
    BLUE: "blue",
    DEEP_BLUE: "deepBlue",
    PURPLE: "purple",
    GREEN: "green",
    ORANGE: "orange",
    RED: "red",
    CYAN: "cyan",
    PINK: "pink",
    AMBER: "amber",
    CORAL: "coral",
    DYNAMIC: "dynamic"
}

function isStockTheme(themeName) {
    return Object.keys(StockThemes.DARK).includes(themeName)
}

function getAvailableThemes(isLight = false) {
    return isLight ? StockThemes.LIGHT : StockThemes.DARK
}

function getThemeByName(themeName, isLight = false) {
    const themes = getAvailableThemes(isLight)
    return themes[themeName] || themes.blue
}

function getAllThemeNames() {
    return Object.keys(StockThemes.DARK)
}