"use client";
import { jsx } from 'react/jsx-runtime';
import { SunIcon, MoonIcon } from '../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.1.1/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 (jsx(Box, { ...props, children: theme === Theme.DARK ? (jsx(SunIcon, { width: size, height: size, onClick: onClickHandler })) : (jsx(MoonIcon, { width: size, height: size, onClick: onClickHandler })) }));
}

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