'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export function ToggleField({ label, value = false, onChange, helpText }) {
    return (_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium", children: label }), helpText && _jsx("p", { className: "text-xs text-[var(--muted-foreground)]", children: helpText })] }), _jsx("button", { type: "button", role: "switch", "aria-checked": value, onClick: () => onChange(!value), className: `relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${value ? 'bg-[var(--primary)]' : 'bg-[var(--muted)]'}`, children: _jsx("span", { className: `bg-card pointer-events-none inline-block h-5 w-5 rounded-full shadow-sm ring-0 transition-transform ${value ? 'translate-x-5' : 'translate-x-0'}` }) })] }));
}
//# sourceMappingURL=ToggleField.js.map