export interface CreateNavigationGuardOptions { /** Function or boolean returning whether there are unsaved changes */ isDirty: boolean | (() => boolean); /** Whether guarding is enabled (defaults to true) */ enabled?: boolean | (() => boolean); /** Optional custom navigation callback (e.g. SvelteKit goto) */ onNavigate?: (url: string) => void; /** Optional callback fired when an internal navigation is intercepted */ onBlocked?: (url: string) => void; } export interface NavigationGuardManager { readonly showConfirm: boolean; setShowConfirm(show: boolean): void; readonly pendingUrl: string | null; intercept(url: string): boolean; confirmLeave(): void; cancelLeave(): void; destroy(): void; } /** * Headless Svelte 5 rune managing navigation guard state and beforeunload interception. */ export declare function createNavigationGuard(options: CreateNavigationGuardOptions): NavigationGuardManager;