"use strict";var e=require("prop-types"),t=require("@material-ui/core"),a=require("react/jsx-runtime");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e),i=t.makeStyles({formControl:{width:130,marginLeft:10,marginTop:8}});function l(e){var r=e.items,n=e.currentValue,l=e.onChange,u=e.label,s=e["data-testid"],o=i();return a.jsxs(t.FormControl,{className:o.formControl,children:[u&&a.jsx(t.InputLabel,{shrink:!0,htmlFor:"c-owp-single-select",children:u}),a.jsx(t.Select,{"data-testid":s,autoWidth:!0,value:n,onChange:l,inputProps:{name:"c-owp-single-select",id:"c-owp-single-select"},children:r.map((function(e){return a.jsx(t.MenuItem,{"data-testid":"".concat(s,"_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)}))})]})}l.propTypes={label:n.default.string,items:n.default.arrayOf(n.default.shape({})).isRequired,currentValue:n.default.oneOfType([n.default.string,n.default.number]).isRequired,onChange:n.default.func.isRequired,"data-testid":n.default.string},l.defaultProps={label:"","data-testid":"SingleSelect"},module.exports=l;
//# sourceMappingURL=SingleSelect.js.map
