type IsAuthenticatedFn = () => boolean; type RouterLike = { push: (to: any) => Promise | unknown; }; type LocationLike = { fullPath?: string; } & Record; type ExitEvents = { onConfirmExit?: (payload: { wizardId?: string; fromRoute: LocationLike; }) => void; onConfirmedReload?: (payload: { wizardId?: string; fromRoute: LocationLike; }) => void; }; export declare const useExitConfirmationGuardState: () => { hasUnsavedChanges: import('vue').Ref; showExitConfirmModal: import('vue').Ref; setPendingNavigationCallback: (callback: () => void | Promise) => void; }; /** * Clears the unsaved changes state. Useful for programmatic logout flows. */ export declare const clearUnsavedChanges: () => void; /** * Helper to extract a wizard identifier from a route. * * A route is considered part of a wizard flow if either: * - `route.meta.wizard.id` is set, or * - any of the matched route records has `meta.wizard.id` set. * * This allows router configs like: * ```ts * { * path: '/wizard/person', * component: WizardLayout, * meta: { wizard: { id: 'person-wizard' } }, * children: [ ...step routes... ] * } * ``` */ export declare function getExitGuardWizardId(route: any): string | undefined; /** * Wizard-aware wrapper around `shouldBlockNavigation`. * * - Returns `true` (block navigation + show modal) only when we are * *leaving* a wizard flow, i.e. `from` belongs to a wizard and * `to` does not belong to samma wizard. * - Navigations *within* the same wizard (same `wizard.id`) are allowed. */ export declare function shouldBlockWizardExit(to: any, from: any): boolean; /** * Checks if navigation should be blocked due to unsaved changes. * Called by the router guard or components (e.g. FdsWizard) to intercept navigation attempts. * * @param to - The target route location (router location or similar shape) * @param from - The current route location (router currentRoute or similar shape) * @returns true if navigation should be blocked, false otherwise */ export declare const shouldBlockNavigation: (to: LocationLike, from: LocationLike) => boolean; export declare function setupExitConfirmationGuard(router: RouterLike, isAuthenticated: IsAuthenticatedFn, events?: ExitEvents): { cancelExit: () => void; confirmExit: () => Promise; }; export declare function useExitConfirmationGuard(initialUnsaved?: boolean): { hasUnsavedChanges: import('vue').Ref; showExitConfirmModal: import('vue').Ref; setHasUnsavedChanges: (value: boolean) => void; }; export {};