import{r as e}from"./rolldown-runtime-hePW80VL.js";import{o as t}from"./vendor-forms-yQg41KHz.js";import{t as n}from"./vendor-react-CAGJwf-T.js";import{t as r}from"./utils-Dk_44zMo.js";import{Mt as i}from"./index-Z_bdWDpJ.js";var a=e(t(),1),o=n(),s=(0,a.forwardRef)(({className:e,label:t,description:n,error:a,id:s,...c},l)=>{let u=s||t?.toLowerCase().replace(/\s+/g,`-`);return(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,o.jsxs)(`div`,{className:`relative flex items-center justify-center mt-0.5`,children:[(0,o.jsx)(`input`,{ref:l,type:`checkbox`,id:u,className:r(`peer w-4 h-4 rounded border appearance-none cursor-pointer`,`transition-colors duration-[var(--transition-fast)]`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-primary)]/30 focus-visible:ring-offset-1`,`checked:bg-[var(--color-primary)] checked:border-[var(--color-primary)]`,a?`border-[var(--color-error)]`:`border-[var(--color-border)] hover:border-slate-400`,`disabled:cursor-not-allowed disabled:opacity-50`,e),...c}),(0,o.jsx)(i,{className:`absolute w-3 h-3 text-white pointer-events-none opacity-0 peer-checked:opacity-100 transition-opacity`})]}),(t||n)&&(0,o.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[t&&(0,o.jsx)(`label`,{htmlFor:u,className:`block text-sm font-medium text-[var(--color-text-primary)] cursor-pointer`,children:t}),n&&(0,o.jsx)(`p`,{className:`text-xs text-[var(--color-text-muted)] mt-0.5`,children:n}),a&&(0,o.jsx)(`p`,{className:`text-xs text-[var(--color-error)] font-medium mt-1`,role:`alert`,children:a})]})]})});s.displayName=`Checkbox`;export{s as t};