1import{r as n,j as e}from"./chunk-KS7C4IRE-Cl4Rd0bf.js";function b({label:d,name:x,value:m="on",checked:c,onChange:a,required:l=!1,error:s,ref:h}){const t=n.useId(),[p,f]=n.useState(!1),i=c!==void 0,r=i?c:p,u=o=>{i||f(o.target.checked),a==null||a(o.target.checked)};return e.jsxs("div",{className:"w-full",children:[e.jsxs("label",{htmlFor:t,className:"flex items-start gap-1.5 cursor-pointer",children:[e.jsx("input",{ref:h,type:"checkbox",id:t,name:x,value:m,className:"peer sr-only",checked:r,onChange:u,required:l,"aria-required":l||void 0,"aria-describedby":s?`${t}-error`:void 0,"aria-invalid":s?!0:void 0}),e.jsx("span",{className:"flex-shrink-0 rounded peer-focus:ring-2 peer-focus:ring-main/30",children:e.jsx("img",{src:r?"/shared/icons/checkbox-on.svg":"/shared/icons/checkbox-off.svg",alt:r?"ãã§ãã¯æ¸ã¿":"æªãã§ãã¯",className:"w-5 h-5"})}),e.jsx("span",{className:"text-sm text-black",children:d})]}),s?e.jsx("p",{id:`${t}-error`,role:"alert",className:"text-error-dark text-xs md:text-sm font-bold mt-1 ml-8",children:s}):null]})}export{b as C};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.