import { MenuItem, Select as MuiSelect, SelectProps as MuiSelectProps } from '@mui/material';

type SelectProps = {
  options?: { label: string; value: string }[];
} & MuiSelectProps;

export const Select = (props: SelectProps) => {
  const { options, ...rest } = props;
  return (
    <MuiSelect {...rest}>
      {options?.map((option) => (
        <MenuItem key={option.value} value={option.value}>
          {option.label}
        </MenuItem>
      ))}
    </MuiSelect>
  );
};
