import e from"prop-types";import{makeStyles as t,FormControl as r,InputLabel as i,Select as a,MenuItem as n}from"@material-ui/core";import{jsxs as o,jsx as l}from"react/jsx-runtime";var s=t({formControl:{width:130,marginLeft:10,marginTop:8}});function d(e){var t=e.items,d=e.currentValue,c=e.onChange,m=e.label,u=e["data-testid"],p=s();return o(r,{className:p.formControl,children:[m&&l(i,{shrink:!0,htmlFor:"c-owp-single-select",children:m}),l(a,{"data-testid":u,autoWidth:!0,value:d,onChange:c,inputProps:{name:"c-owp-single-select",id:"c-owp-single-select"},children:t.map((function(e){return l(n,{"data-testid":"".concat(u,"_option_").concat(e.title||e.name||e,"MenuItem"),value:e.key||e.id||e,children:e.title||e.name||e},e.key||e.id||e)}))})]})}d.propTypes={label:e.string,items:e.arrayOf(e.shape({})).isRequired,currentValue:e.oneOfType([e.string,e.number]).isRequired,onChange:e.func.isRequired,"data-testid":e.string},d.defaultProps={label:"","data-testid":"SingleSelect"};export{d as default};
//# sourceMappingURL=SingleSelect.js.map
