Whether the guard is active. When false, navigation is unblocked.
OptionalonConfirmLeave
onConfirmLeave?:()=>void
Called when the user confirms they want to leave.
Use this to clean up (disconnect, save state) and navigate away.
If omitted, the browser simply navigates back.
Options for useNavigationGuard.