import{_ as e}from"./vendor-flow-IzlrcDx6.js";import{rn as t}from"./index-HkVQGc9M.js";var n=e();function r({checked:e,onChange:r,label:i,description:a,disabled:o,size:s=`md`}){let c=s===`sm`?`w-8 h-[18px]`:`w-10 h-[22px]`,l=s===`sm`?`w-3.5 h-3.5`:`w-4 h-4`,u=s===`sm`?`translate-x-[14px]`:`translate-x-[18px]`;return(0,n.jsxs)(`label`,{className:t(`flex items-start gap-3 cursor-pointer`,o&&`cursor-not-allowed opacity-50`),children:[(0,n.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,onClick:()=>!o&&r(!e),disabled:o,className:t(`relative inline-flex flex-shrink-0 rounded-full border-2 border-transparent transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]/30 focus-visible:ring-offset-1`,c,e?`bg-[var(--color-primary)]`:`bg-slate-200 dark:bg-slate-700`),children:(0,n.jsx)(`span`,{className:t(`inline-block rounded-full bg-white shadow-sm transform transition-transform duration-200`,l,e?u:`translate-x-0.5`,`mt-[1px]`)})}),(i||a)&&(0,n.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[i&&(0,n.jsx)(`span`,{className:`block text-sm font-medium text-[var(--color-text-primary)]`,children:i}),a&&(0,n.jsx)(`span`,{className:`block text-xs text-[var(--color-text-muted)] mt-0.5`,children:a})]})]})}export{r as t};