import { Route } from './route'; import { RouteBase } from './route-base'; import { NimbleApp } from '../app'; import { RouterState } from './router-state.enum'; import { RouterEvent } from './router-event'; export declare class Router { static get app(): NimbleApp; private static _routes; private static _current; private static _next; private static _previous; private static _state; static get state(): RouterState; private static _previousState; static get previousState(): RouterState; private static lastLocationPath; private static stopListening; private static listeners; static useHash: boolean; static _nextPath: string; private static nextRejectedAndRedirectAfter; private static get realCurrentPath(); static get currentPath(): string; static get nextPath(): string; static get routes(): Route[]; static get abstractRoutes(): Route[]; static get singleRoutes(): Route[]; static get current(): Route; static get next(): Route; static get previous(): Route; static get onRoute(): boolean; static get rerenderedBeforeFinishedRouteChange(): boolean; static registerRoutes(routes: RouteBase[]): void; private static removeBaseHrefPath; private static pathHasInsideBaseHref; private static setState; static start(): void; /** * Adds a listener for when the routing state changes. * Also it returns a void function to cancel listen when want. * @param states * @param callback */ static addListener(states: string | RouterState | (RouterState | string)[], callback: (event?: RouterEvent) => void): () => void; /** * Adds a listener for when the routing change start. * Also it returns a void function to cancel listen when want. */ static onStartChange(action: (event?: RouterEvent) => void): () => void; /** * Adds a listener for when the routing change end. * Also it returns a void function to cancel listen when want. */ static onEndChange(action: (event?: RouterEvent) => void): () => void; private static notifyListeners; private static onRedirect; private static checkPageCanBeCurrent; private static defineNextPage; private static onRouterChange; private static loadCurrentRoutePage; private static loadRoutesPageFromAllParents; private static defineCurrentAfterFinished; private static abortChangeRoute; private static updateURLPath; private static loadRoutePage; private static routeCanActivate; static redirect(path: string): Promise; private static pathIsHashLink; private static currentPathIsHashLink; private static notifyOldRoutesElementExit; private static whenRerenderIsRequested; static getCommonParentOfTwoRoutes(routeA: Route, routeB: Route): Route; private static getEventType; }