import { useEffect as e } from "react";
import { jsx as t } from "react/jsx-runtime";
//#region src/ConfigProvider.tsx
var n = ({ children: n, config: r }) => (e(() => {
	if (r) {
		let e = document.documentElement;
		if (r.customColors && Object.entries(r.customColors).forEach(([t, n]) => {
			e.style.setProperty(`--custom-color-${t}`, n);
		}), r.blues && Object.entries(r.blues).forEach(([t, n]) => {
			e.style.setProperty(`--blue-${t}`, n);
		}), r.grays && Object.entries(r.grays).forEach(([t, n]) => {
			e.style.setProperty(`--gray-${t}`, n);
		}), r.accents && Object.entries(r.accents).forEach(([t, n]) => {
			e.style.setProperty(`--${t}`, n);
		}), r.primary && Object.entries(r.primary).forEach(([t, n]) => {
			e.style.setProperty(`--${t}`, n);
		}), r.language) {
			let t = {
				en: "ProximaNova",
				ar: "Noto Sans Arabic",
				az: "Noto Sans",
				bn: "UN Bangla",
				he: "Noto Sans Hebrew",
				hi: "Noto Sans Devanagari",
				ja: "Noto Sans JP",
				ka: "Noto Sans Georgian",
				km: "Noto Sans Khmer",
				ko: "Noto Sans KR",
				my: "Noto Sans Myanmar",
				ne: "Noto Sans",
				zh: "Noto Sans SC"
			};
			e.style.setProperty("--font-sans", t[r.language]), e.style.setProperty("--font-heading", r.language === "en" ? "SohneBreit" : t[r.language]);
		}
		r.fonts?.body && e.style.setProperty("--font-sans", r.fonts.body), r.fonts?.heading && e.style.setProperty("--font-heading", r.fonts.heading);
	}
}, [r]), /* @__PURE__ */ t("div", {
	className: r?.mode === "dark" ? "dark" : "",
	dir: r?.rtl ? "rtl" : "ltr",
	children: n
}));
//#endregion
export { n as ConfigProvider };

//# sourceMappingURL=ConfigProvider.js.map