!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 n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.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 n=r(6031),a=r.n(n),l=r(2462),i=r.n(l),u=r(2015),p=r.n(u),d=r(8619),s=r(3294),c=r(6842),m=r.n(c);const f=["name","options","placeholder"],b=e=>{let{name:t,options:r,placeholder:o}=e,n=i()(e,f);const l=o||m().translate("general.select_an_option"),[u,c,b]=(0,s.useField)(t);return p().createElement(d.FormControl,{fullWidth:!0,error:c.touched&&Boolean(c.error)},p().createElement(d.Select,a()({variant:"outlined",name:t,value:u.value||"",onChange:e=>{b.setValue(e.target.value)},displayEmpty:!0},n,{renderValue:e=>{if(!e)return p().createElement("em",null,l);const t=r.find((({value:t})=>t===e));return t?t.label:""}}),r.map((({label:e,value:t})=>p().createElement(d.MenuItem,{key:`radio-ddl-${t}`,value:t},p().createElement(d.Radio,{checked:u.value===t}),p().createElement(d.ListItemText,{primary:e}))))))};return o})()));
//# sourceMappingURL=dropdown-radio.js.map