!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={3209:(e,r,o)=>{o.d(r,{mn:()=>t});const t=10},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 n=r[t];if(void 0!==n)return n.exports;var a=r[t]={exports:{}};return e[t](a,a.exports,o),a.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:()=>y});var n=o(6031),a=o.n(n),l=o(2462),u=o.n(l),i=o(2015),s=o.n(i),p=o(9825),c=o.n(p),d=o(8619),m=o(3294),b=o(3209);const f=["name","label","options"],x=e=>{let{name:r,label:o,options:t}=e,n=u()(e,f);const[l,i,p]=(0,m.useField)({name:r}),c=Array.isArray(l.value)?l.value:[],x=e=>{const{value:r,checked:o}=e.target;o?p.setValue([...c,parseInt(r,b.mn)]):p.setValue(c.filter((e=>e!==parseInt(r,b.mn))))};return s().createElement(d.FormControl,{fullWidth:!0,margin:"normal",error:i.touched&&Boolean(i.error)},o&&s().createElement(d.FormLabel,{id:"checkbox-group-label"},o),s().createElement(d.FormGroup,a()({"aria-labelledby":"checkbox-group-label",row:!0,name:r},n),t.map((e=>s().createElement(d.FormControlLabel,{key:`chk-box-${e.value}`,control:s().createElement(d.Checkbox,{checked:c.includes(e.value),onChange:x,value:e.value,sx:{"& .MuiSvgIcon-root":{fontSize:24}}}),label:e.label})))),i.touched&&i.error&&s().createElement(d.FormHelperText,null,i.error))};x.propTypes={name:c().string.isRequired,label:c().string,options:c().array.isRequired};const y=x;return t})()));
//# sourceMappingURL=checkbox-group.js.map