"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("prop-types"),t=require("@material-ui/core"),r=require("react/jsx-runtime");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=a(e),n=function(e){var a=e.label,l=e.currentValue,n=e.options,u=e.onChange;return r.jsxs(t.FormControl,{style:{width:"100%"},children:[a&&r.jsx(t.InputLabel,{shrink:!0,children:a}),r.jsx(t.Select,{"data-testid":"".concat("PeriodSelect","_select"),value:l,onChange:function(e){u(e.target.value.includes("all")?null:e.target.value)},children:n.map((function(e){var a=e.value,l=e.label;return r.jsx(t.MenuItem,{"data-testid":"".concat("PeriodSelect","_option_").concat(a,"MenuItem"),value:a,children:l},a)}))})]})};n.propTypes={label:l.default.string,currentValue:l.default.string.isRequired,options:l.default.arrayOf(l.default.shape({})).isRequired,onChange:l.default.func.isRequired},n.defaultProps={label:""},exports.PeriodSelect=n;
