import e from"prop-types";import{FormControl as r,InputLabel as a,Select as n,MenuItem as t}from"@material-ui/core";import{jsxs as l,jsx as i}from"react/jsx-runtime";var c=function(e){var c=e.label,o=e.currentValue,u=e.options,s=e.className,d=e.renderValue,p=e.onChange;return l(r,{className:s,children:[c&&i(a,{shrink:!0,children:c}),i(n,{"data-testid":"".concat("SingleSelect","_select_").concat(c),value:o,renderValue:d,onChange:p,children:u.map((function(e){var r=e.value,a=e.label;return i(t,{"data-testid":"".concat("SingleSelect","_option_").concat(r,"MenuItem"),value:r,children:a},r)}))})]})};c.propTypes={label:e.string,currentValue:e.string.isRequired,options:e.arrayOf(e.shape({})).isRequired,className:e.string.isRequired,renderValue:e.func,onChange:e.func.isRequired},c.defaultProps={label:"",renderValue:null};export{c as SingleSelect};
