'use strict';

var jsxRuntime = require('../../node_modules/.pnpm/react@18.2.0/node_modules/react/jsx-runtime.cjs');
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.0_react@18.2.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.cjs');
var box = require('../box/box.cjs');
var theme = require('./theme.cjs');

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

exports.ThemeSwitcher = ThemeSwitcher;
//# sourceMappingURL=switcher.cjs.map
