import { RecognizedRoute } from "./recognizer.js"; import { Router } from "./router.js"; /** * @alpha */ export declare type NavigationPhaseName = "navigate" | "leave" | "construct" | "enter" | "commit"; /** * @alpha */ export declare type NavigationPhaseHook = (phase: NavigationPhase) => Promise | any; /** * @alpha */ export declare type NavigationCommitPhaseHook = (phase: NavigationCommitPhase) => Promise | any; /** * @alpha */ export declare type NavigationPhaseFollowupAction = () => Promise | any; /** * @alpha */ export interface NavigationPhase { readonly name: NavigationPhaseName; readonly route: RecognizedRoute; readonly router: Router; readonly canceled: boolean; cancel(callback?: NavigationPhaseFollowupAction): void; onCancel(callback: NavigationPhaseFollowupAction): void; onCommit(callback: NavigationPhaseFollowupAction): void; evaluateContributor(contributor: any, route?: RecognizedRoute, router?: Router): Promise; } /** * @alpha */ export interface NavigationCommitPhase extends Omit, "cancel" | "canceled" | "onCancel"> { setTitle(title: string): any; }