Preparing search index...

    Dialog state and handlers returned by useUnsavedChangesGuard.

    interface UnsavedChangesGuard {
        isDiscardDialogVisible: boolean;
        confirmDiscard: () => void;
        cancelDiscard: () => void;
        dismissDialog: () => void;
        allowRemoval: () => void;
    }
    Index
    isDiscardDialogVisible: boolean

    Whether the discard-confirmation dialog should be rendered.

    confirmDiscard: () => void

    Dismisses the dialog and replays the navigation action that was blocked.

    cancelDiscard: () => void

    Drops the blocked action and keeps the user on the screen.

    dismissDialog: () => void

    Hides the dialog without deciding — safe to run before confirmDiscard.

    allowRemoval: () => void

    Disarms the guard permanently so a completed save can navigate away.