/** * 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 (
The document "{documentTitle}" has unsaved changes. Do you want to save before closing?
{/* Actions */}