import { j as jsxRuntimeExports } from '../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.js';
import { SunIcon, MoonIcon } from '../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js';
import { Box } from '../box/box.js';
import { useTheme } from './theme.js';

var Theme;
(function (Theme) {
    Theme["DARK"] = "dark";
    Theme["LIGHT"] = "light";
})(Theme || (Theme = {}));
function ThemeSwitcher({ size = 30, ...props }) {
    const { theme, setTheme } = useTheme();
    const onClickHandler = () => {
        setTheme(theme === Theme.DARK ? Theme.LIGHT : Theme.DARK);
    };
    return (jsxRuntimeExports.jsx(Box, { ...props, children: theme === Theme.DARK ? (jsxRuntimeExports.jsx(SunIcon, { width: size, height: size, onClick: onClickHandler })) : (jsxRuntimeExports.jsx(MoonIcon, { width: size, height: size, onClick: onClickHandler })) }));
}

export { ThemeSwitcher };
//# sourceMappingURL=switcher.js.map
