import Button from "@mui/material/Button";
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogDescription, DialogBody } from '@/components/ui/dialog';

const ConfirmDialog = ({ open, onClose, title, content, onYes, onNo, onOpenChange }: any) => {
  return (
    <Dialog open={open} onOpenChange={onOpenChange}>
      <DialogContent>
        <DialogHeader>
          {title && <DialogTitle className="">{title}</DialogTitle>}
          <DialogBody>
            {content && <DialogDescription className="">{content}</DialogDescription>}
          </DialogBody>
        </DialogHeader>
        <DialogFooter className="flex justify-end gap-2 pt-4">
          <Button color="secondary" onClick={onNo}>No</Button>
          <Button color="primary" onClick={onYes}>Yes</Button>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  );
};

export default ConfirmDialog;