!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],t):"object"==typeof exports?exports["openstack-uicore-foundation"]=t():e["openstack-uicore-foundation"]=t()}(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")},6842:e=>{e.exports=require("i18n-react/dist/i18n-react")},2015:e=>{e.exports=require("react")}},t={};function r(o){var a=t[o];if(void 0!==a)return a.exports;var l=t[o]={exports:{}};return e[o](l,l.exports,r),l.exports}(()=>{r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t}})(),(()=>{r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}})(),(()=>{r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};r.r(o),r.d(o,{default:()=>b});var a=r(6031),l=r.n(a),n=r(2462),i=r.n(n),u=r(2015),d=r.n(u),p=r(8619),s=r(3294),c=r(6842),m=r.n(c);const f=["name","label","options","placeholder"],b=e=>{let{name:t,label:r,options:o,placeholder:a}=e,n=i()(e,f);const u=a||m().translate("placeholders.select"),[c,b,v]=(0,s.useField)(t);return d().createElement(p.FormControl,{fullWidth:!0,error:b.touched&&Boolean(b.error)},r&&d().createElement(p.InputLabel,{shrink:!0,id:`${t}-label`},r),d().createElement(p.Select,l()({variant:"outlined",name:t,label:r,labelId:`${t}-label`,value:c.value||"",onChange:e=>{v.setValue(e.target.value)},displayEmpty:!0},n,{renderValue:e=>{if(!e)return d().createElement("em",null,u);const t=o.find((({value:t})=>t===e));return t?t.label:""}}),o.map((({label:e,value:t})=>d().createElement(p.MenuItem,{key:`radio-ddl-${t}`,value:t},d().createElement(p.Radio,{checked:c.value===t}),d().createElement(p.ListItemText,{primary:e}))))))};return o})()));
//# sourceMappingURL=dropdown-radio.js.map