"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("../../../_virtual/jsx-runtime.js"),R=require("react"),d=require("../styles.js"),a=require("../../../utils/index.js");function j({id:t,name:u,label:e,value:p,onChange:x=a.noop,disabled:k=!1,hasError:f=!1,indeterminate:n,checked:h,tabIndex:l,...r},C){!t&&e&&(t=a.slugify(e));const s=a.getId(r["data-testid"]),c=a.getId(r["data-trackid"]);return i.jsxRuntimeExports.jsxs(d.CheckRadioWrapper,{children:[i.jsxRuntimeExports.jsx(d.CheckRadioInput,{ref:o=>{o&&n!==void 0&&(o.indeterminate=n)},type:"checkbox",id:t,name:u,value:p,disabled:k,hasError:f,onChange:x,"data-testid":s("input"),"data-trackid":c("input"),"aria-label":r["aria-label"]||e,checked:h,tabIndex:l}),e&&i.jsxRuntimeExports.jsx(d.CheckRadioLabel,{htmlFor:t,"data-testid":s("label"),"data-trackid":c("label"),children:e})]})}const I=R.forwardRef(j);exports.CheckboxInput=I;
