"use strict";const t=require("react/jsx-runtime"),n=require("react"),b=require("../input/input.cjs"),v=require("../label/label.cjs"),s=require("../tools/tools.cjs"),x=function(k){const{as:o="input",children:l,className:r,contentClasses:C,dropOldClass:a,id:c,indeterminate:i,inline:y,reverse:N,style:u,switch:R,variables:m,...h}=k,p=n.useRef(null);n.useEffect(()=>{const e=p.current;i&&e&&(e.indeterminate=!0)},[i]);const f=n.useCallback(e=>p.current=e,[]),d=n.useMemo(()=>{const e=s.classx(!a&&"form-check-input",r),j=s.stylex((_,q)=>({tKey:s.convertBsKeyToVar(q)}),m,u);return{className:e,style:j}},[a,r,m,u]);if(l){const e=s.processSlotClasses(C,{component:"form-check-input",container:s.classxWithOptions(null,"form-check",R&&"form-switch",y&&"form-check-inline",N&&"form-check-reverse"),label:"form-check-label"});return t.jsxs("div",{className:e.container,"data-slot-container":"",children:[t.jsx(b.Input,{...h,...d,as:o,className:e.component,"data-slot-component":"",dropOldClass:!0,id:c,onRef:f,type:"checkbox"}),t.jsx(v.Label,{className:e.label,"data-slot-label":"",dropOldClass:!0,htmlFor:c,children:l})]})}return t.jsx(b.Input,{...h,...d,as:o,id:c,onRef:f,type:"checkbox"})};x.displayName="BRL.Checkbox";exports.Checkbox=x;
//# sourceMappingURL=checkbox.cjs.map
