"use strict";var e=require("prop-types"),t=require("@material-ui/core"),r=require("@material-ui/core/styles"),a=require("react/jsx-runtime");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(e);function o(e){var r=e.items,s=e.currentValue,i=e.onChange,o=e.classes,l=e["data-testid"];return a.jsx(t.FormControl,{className:o.formControl,children:a.jsx(t.Select,{"data-testid":"".concat(l,"_select"),className:o.select,MenuProps:{classes:{paper:o.paper}},autoWidth:!0,value:s,onChange:function(e){return i(e.target.value)},children:r.map((function(e){return a.jsx(t.MenuItem,{"data-testid":"".concat(l,"_option_").concat(e.key,"MenuItem"),value:e.key,children:a.jsx(t.ListItemText,{primary:e.label,classes:{root:o.listItem,primary:o.listItemPrimaryText}})},e.key)}))})})}o.propTypes={items:i.default.array.isRequired,currentValue:i.default.string.isRequired,onChange:i.default.func.isRequired,classes:i.default.shape({}).isRequired,"data-testid":i.default.string},o.defaultProps={"data-testid":"MetricsSelect"};var l=r.withStyles({select:{"&:before":{borderBottom:0},"&:after":{borderBottom:0}},formControl:{width:"150px"},listItem:{padding:0},listItemPrimaryText:{color:"#fff",fontSize:"14px",overflow:"hidden",textOverflow:"ellipsis"},paper:{backgroundColor:"#414141",maxHeight:"300px"}})(o);module.exports=l;
