import CloseIcon from '@mui/icons-material/Close'; import { Button, Card, CardActions, CardContent, CardHeader, Modal, Typography } from "@mui/material"; import { FunctionComponent } from 'react'; import { useTranslation } from "react-i18next"; export interface DeleteConfirmationModalProps { title: string, subtitle?: string, message?: string, isOpen: boolean, closeFn: () => void, deleteFn: () => void } export const DeleteConfirmationModal: FunctionComponent = ( { title, subtitle, isOpen, message, deleteFn, closeFn }) => { const [t] = useTranslation(); const style = { position: 'absolute', top: '50%', left: '50%', transform: 'translate(-50%, -50%)', // width: 500, bgcolor: 'background.paper', borderWidth: 0, boxShadow: 24, p: 2, }; const handleDelete = () => { deleteFn(); closeFn(); }; return ( } /> {message} ); };