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