"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var a=require("../../../_virtual/jsx-runtime.js"),R=require("../../../icons/AlertCircle.js"),n=require("../../../utils/index.js"),d=require("../styles.js"),m=require("./CheckboxInput.js");function v({value:C,options:s,onChange:k,name:j,groupLabel:c,orientation:h="row",id:o,hasError:r=!1,errorText:l,disabled:p=!1,assistText:x,...u}){const i=n.getId(u["data-testid"]),t=n.getId(u["data-trackid"]);return a.jsxRuntimeExports.jsxs(d.CheckRadioInputGroupWrapper,{children:[c&&a.jsxRuntimeExports.jsx(d.CheckRadioGroupLabel,{"data-testid":i("group-label"),"data-trackid":t("group-label"),children:c}),s&&a.jsxRuntimeExports.jsx(d.CheckRadioGroupWrapper,{orientation:h,children:s.map(e=>a.jsxRuntimeExports.jsx(m.CheckboxInput,{label:e.label,value:e.value,id:e.id,name:j,hasError:r,disabled:p||e.disabled,onChange:k,"data-testid":i(e["data-testid"]),"data-trackid":t(e["data-trackid"]),"aria-label":e.label,indeterminate:e.indeterminate,checked:e.checked},e.value))}),r&&l&&a.jsxRuntimeExports.jsxs(d.CheckRadioErrorArea,{"data-testid":i("error"),"data-trackid":t("error"),children:[a.jsxRuntimeExports.jsx(R.default,{}),l]}),x&&!r&&a.jsxRuntimeExports.jsx(d.CheckRadioHintArea,{"data-testid":i("assistText"),"data-trackid":t("assistText"),children:x})]})}exports.CheckboxGroup=v;
