

export type ColorEnumBGOY = "primary" | "red" | "green" | "blue" | "pink" | "yellow" | "orange" | "purple" | "deeppurple" | "lightblue" | "teal" | "lime" | "deeporange";

export const setColorTheme = (color: ColorEnumBGOY) => {
    let colorClass = "k-color-brand-primary";

    switch (color) {
        case 'primary':
            colorClass = "k-color-brand-primary";
            break;
        case 'red':
            colorClass = "k-color-brand-red";
            break;
        case 'green':
            colorClass = "k-color-brand-green";
            break;
        case 'blue':
            colorClass = "k-color-brand-blue";
            break;

        case 'pink':
            colorClass = "k-color-brand-pink";
            break;
        case 'yellow':
            colorClass = "k-color-brand-yellow";
            break;
        case 'orange':
            colorClass = "k-color-brand-orange";
            break;
        case 'purple':
            colorClass = "k-color-brand-purple";
            break;
        case 'deeppurple':
            colorClass = "k-color-brand-deeppurple";
            break;
        case 'lightblue':
            colorClass = "k-color-brand-lightblue";
            break;
        case 'teal':
            colorClass = "k-color-brand-teal";
            break;
        case 'lime':
            colorClass = "k-color-brand-lime";
            break;
        case 'deeporange':
            colorClass = "k-color-brand-deeporange";
            break;
        default:
    }

    const htmlEl = document.documentElement;
    htmlEl.classList.forEach((c) => {
        if (c.includes("k-color")) htmlEl.classList.remove(c);
    });
    if (colorClass) htmlEl.classList.add(colorClass);
};