!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},8619:e=>{e.exports=require("@mui/material")},3294:e=>{e.exports=require("formik")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},r={};function o(t){var a=r[t];if(void 0!==a)return a.exports;var n=r[t]={exports:{}};return e[t](n,n.exports,o),n.exports}(()=>{o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r}})(),(()=>{o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})}})(),(()=>{o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};o.r(t),o.d(t,{default:()=>x});var a=o(6031),n=o.n(a),l=o(2462),i=o.n(l),u=o(2015),p=o.n(u),s=o(9825),d=o.n(s),c=o(8619),m=o(3294);const b=["name","label","marginWrapper","options"],f=e=>{let{name:r,label:o,marginWrapper:t="normal",options:a}=e,l=i()(e,b);const[u,s]=(0,m.useField)({name:r});return p().createElement(c.FormControl,{fullWidth:!0,margin:t,error:s.touched&&Boolean(s.error)},o&&p().createElement(c.FormLabel,{id:"radio-group-label"},o),p().createElement(c.RadioGroup,n()({"aria-labelledby":"radio-group-label",defaultValue:u.value,name:r},u,l),a.map((e=>p().createElement(c.FormControlLabel,{key:`radio-box-${e.value}`,value:e.value,control:p().createElement(c.Radio,{sx:{"& .MuiSvgIcon-root":{fontSize:24}}}),label:e.label})))),s.touched&&s.error&&p().createElement(c.FormHelperText,null,s.error))};f.propTypes={name:d().string.isRequired,label:d().string,marginWrapper:d().string,options:d().array.isRequired};const x=f;return t})()));
//# sourceMappingURL=radio-group.js.map