import{a as e}from"./rolldown-runtime-B0Z9INg1.js";import{$ as t}from"./vendor-charts-iXlq6Rne.js";import{_ as n}from"./vendor-flow-IzlrcDx6.js";import{Wn as r,rn as i}from"./index-HkVQGc9M.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:i(`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)(r,{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};