import{j as a}from"./app-DB4YCWeF.js";import{B as x}from"./BaseForm-CkSb_d40.js";function C(l){const{name:e,handleChange:r,data:t,errors:b,alt:h=null,isLabel:c=!0,ref:i,disabled:o=!1,readOnly:m=!1,defaultChecked:u=!1}=l;let{checked:n=!1,label:s=null,className:d="checkbox",labelClassName:f="label-text capitalize "}=l;return s||(s=e.split("_").join(" ")),(t[e]||t[e]==1)&&(n=!0),a.jsx(x,{...l,isLabel:!1,children:a.jsxs("label",{className:"label cursor-pointer w-max gap-2",children:[a.jsx("input",{ref:i,type:"checkbox",className:`${d}`,onChange:r,name:e,id:e,disabled:o,readOnly:m,checked:n}),c&&a.jsx("span",{className:f,children:s})]})})}export{C};
