/** * UnsavedChangesDialog Component * * Modal dialog shown when closing a document with unsaved changes * Currently using browser confirm() but this provides a foundation * for a custom dialog in the future */ interface UnsavedChangesDialogProps { documentTitle: string; onSave: () => void; onDiscard: () => void; onCancel: () => void; } const UnsavedChangesDialog = ({ documentTitle, onSave, onDiscard, onCancel, }: UnsavedChangesDialogProps) => { return (
{/* Header */}

Unsaved Changes

{/* Message */}

The document "{documentTitle}" has unsaved changes. Do you want to save before closing?

{/* Actions */}
); }; export default UnsavedChangesDialog;