"use client";
'use strict';

var jsxRuntime = require('react/jsx-runtime');
var reactIcons_esm = require('../../node_modules/.pnpm/@radix-ui_react-icons@1.3.2_react@19.1.1/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.jsx(box.Box, { ...props, children: theme$1 === Theme.DARK ? (jsxRuntime.jsx(reactIcons_esm.SunIcon, { width: size, height: size, onClick: onClickHandler })) : (jsxRuntime.jsx(reactIcons_esm.MoonIcon, { width: size, height: size, onClick: onClickHandler })) }));
}

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