import React from 'react';
import PropTypes from 'prop-types';

import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from '@/mui/components';

function EmptyDialog(props) {
  return (
    <Dialog open={props.open} onClose={props.onClose} maxWidth="md">
      <DialogTitle onClose={props.onClose}>Cannot save report</DialogTitle>
      <DialogContent>Please select at least 1 metric</DialogContent>
      <DialogActions>
        <Button size="small" color="primary" onClick={props.onSubmit}>
          Ok
        </Button>
      </DialogActions>
    </Dialog>
  );
}

EmptyDialog.propTypes = {
  open: PropTypes.bool.isRequired,
  onClose: PropTypes.func.isRequired,
  onSubmit: PropTypes.func.isRequired,
};

export default EmptyDialog;
