import { useEffect } from "react";
export const useThemeSwitcher = ({ themeName, overrides, } = {}) => {
    useEffect(() => {
        /**
         * Sets the major theme.
         */
        if (themeName) {
            document.documentElement.setAttribute("data-theme", themeName);
        }
        /**
         * Allows clients to override CSS theme variables.
         */
        if (overrides) {
            Object.entries(overrides).forEach(([key, value]) => {
                document.documentElement.style.setProperty(key, value);
            });
        }
    }, [themeName, overrides]);
};
//# sourceMappingURL=global.js.map