import React from "react"; import { Stack, Typography, Button } from "@mui/material"; interface ConfirmProps { onSubmit: () => void | Promise; onClose: () => void; message?: string; confirmLabel?: string; cancelLabel?: string; disabled?: boolean; } /** * Simple confirmation content to be rendered inside the shared Modal. * Shows an "Are you sure?" message and calls the parent's onSubmit when confirmed. */ const Confirm: React.FC = ({ onSubmit, onClose, message = "Are you sure you want to continue?", confirmLabel = "Yes, continue", cancelLabel = "Cancel", disabled = false, }) => { const handleConfirm = async () => { await Promise.resolve(onSubmit()); }; return ( {message} ); }; export default Confirm;