import e from"prop-types";import{FormControl as t,Select as r,MenuItem as a,ListItemText as o}from"@material-ui/core";import{withStyles as i}from"@material-ui/core/styles";import{jsx as s}from"react/jsx-runtime";function l(e){var i=e.items,l=e.currentValue,n=e.onChange,c=e.classes,m=e["data-testid"];return s(t,{className:c.formControl,children:s(r,{"data-testid":"".concat(m,"_select"),className:c.select,MenuProps:{classes:{paper:c.paper}},autoWidth:!0,value:l,onChange:function(e){return n(e.target.value)},children:i.map((function(e){return s(a,{"data-testid":"".concat(m,"_option_").concat(e.key,"MenuItem"),value:e.key,children:s(o,{primary:e.label,classes:{root:c.listItem,primary:c.listItemPrimaryText}})},e.key)}))})})}l.propTypes={items:e.array.isRequired,currentValue:e.string.isRequired,onChange:e.func.isRequired,classes:e.shape({}).isRequired,"data-testid":e.string},l.defaultProps={"data-testid":"MetricsSelect"};var n=i({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"}})(l);export{n as default};
