import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
import { cx, cva } from '../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
import { forwardRef } from 'react';
import styles from './switch.module.css.js';
import { Root, Thumb } from '../../node_modules/.pnpm/@radix-ui_react-switch@1.2.5_@types_react-dom@19.1.7_@types_react@19.1.9__@types_react@19.1.9_7cc2hdqtqg5xrhsyw2ibpmjamm/node_modules/@radix-ui/react-switch/dist/index.js';

const switchVariants = cva(styles.switch, {
    variants: {
        size: {
            large: styles.large,
            small: styles.small
        }
    },
    defaultVariants: {
        size: 'large'
    }
});
const Switch = forwardRef(({ className, disabled, required, size, name, value, ...props }, forwardedRef) => (jsxs(Fragment, { children: [jsx(Root, { ...props, ref: forwardedRef, disabled: disabled, required: required, className: switchVariants({ size, className }), "data-disabled": disabled, children: jsx(SwitchThumb, {}) }), name && (jsx("input", { type: 'hidden', name: name, value: value || 'on', disabled: disabled }))] })));
const SwitchThumb = forwardRef(({ className, ...props }, ref) => (jsx(Thumb, { ref: ref, className: cx(styles.thumb, className), ...props })));
Switch.displayName = 'Switch';

export { Switch };
//# sourceMappingURL=switch.js.map
