import { CachingService } from "src/Services";

//  export const ThemeColors = () => {
//      let rootStyle = getComputedStyle(document.body);
//      return {
//         themeColor1 : rootStyle.getPropertyValue("--theme-color-1").trim(),
//         themeColor2 : rootStyle.getPropertyValue("--theme-color-2").trim(),
//         themeColor3 : rootStyle.getPropertyValue("--theme-color-3").trim(),
//         themeColor4 : rootStyle.getPropertyValue("--theme-color-4").trim(),
//         themeColor5 : rootStyle.getPropertyValue("--theme-color-5").trim(),
//         themeColor6 : rootStyle.getPropertyValue("--theme-color-6").trim(),
//         themeColor1_10 : rootStyle.getPropertyValue("--theme-color-1-10").trim(),
//         themeColor2_10 : rootStyle.getPropertyValue("--theme-color-2-10").trim(),
//         themeColor3_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
//         themeColor4_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
//         themeColor5_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
//         themeColor6_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
//         primaryColor: rootStyle.getPropertyValue("--primary-color").trim(),
//         foregroundColor: rootStyle.getPropertyValue("--foreground-color").trim(),
//         separatorColor: rootStyle.getPropertyValue("--separator-color").trim()
//     }
// }
 export const ThemeColors = () => {
     let rootStyle = getComputedStyle(document.body);
     let cachingService = new CachingService();
     let themeColor= cachingService.readPersistant("ThemeColor");

     if(themeColor == "blueTheme") {
        return {
            themeColor1 : "#145388",
            themeColor2 : "#f5a448",
            themeColor3 : "#cbdbcc",
            themeColor4 : "#494d43",
            themeColor5 : "#d1c19a",
            themeColor6 : "#7c8174",
            themeColor1_10 : rootStyle.getPropertyValue("--theme-color-1-10").trim(),
            themeColor2_10 : rootStyle.getPropertyValue("--theme-color-2-10").trim(),
            themeColor3_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor4_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor5_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor6_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            primaryColor: "#333",
            foregroundColor: "#fff",
            separatorColor: "#f3f3f3"
        }
     } else if(themeColor == "purpleTheme") {
        return {
            themeColor1 : "#922c88",
            themeColor2 : "#f5a448",
            themeColor3 : "#cbdbcc",
            themeColor4 : "#494d43",
            themeColor5 : "#d1c19a",
            themeColor6 : "#7c8174",
            themeColor1_10 : rootStyle.getPropertyValue("--theme-color-1-10").trim(),
            themeColor2_10 : rootStyle.getPropertyValue("--theme-color-2-10").trim(),
            themeColor3_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor4_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor5_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor6_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            primaryColor: "#333",
            foregroundColor: "#fff",
            separatorColor: "#f3f3f3"
        }
     }else if(themeColor == "brownTheme" || themeColor == "lightGreenTheme") {
        return {
            themeColor1 : "#b99229",
            themeColor2 : "#f5a448",
            themeColor3 : "#cbdbcc",
            themeColor4 : "#494d43",
            themeColor5 : "#d1c19a",
            themeColor6 : "#7c8174",
            themeColor1_10 : rootStyle.getPropertyValue("--theme-color-1-10").trim(),
            themeColor2_10 : rootStyle.getPropertyValue("--theme-color-2-10").trim(),
            themeColor3_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor4_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor5_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor6_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            primaryColor: "#333",
            foregroundColor: "#fff",
            separatorColor: "#f3f3f3"
        }
     }else {
        return {
            themeColor1 : "#576a3d",
            themeColor2 : "#f5a448",
            themeColor3 : "#cbdbcc",
            themeColor4 : "#494d43",
            themeColor5 : "#d1c19a",
            themeColor6 : "#7c8174",
            themeColor1_10 : rootStyle.getPropertyValue("--theme-color-1-10").trim(),
            themeColor2_10 : rootStyle.getPropertyValue("--theme-color-2-10").trim(),
            themeColor3_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor4_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor5_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            themeColor6_10 : rootStyle.getPropertyValue("--theme-color-3-10").trim(),
            primaryColor: "#333",
            foregroundColor: "#fff",
            separatorColor: "#f3f3f3"
        }
     }

}