import { NavType } from "./enums"; export interface DebuggerArrayConfig { error?: boolean; warn?: boolean; info?: boolean; debug?: boolean; } export type DebuggerConfig = boolean | DebuggerArrayConfig; export type UniLifecycleHook = 'onShow' | 'onLoad' | 'onInit' | 'onReady' | string; export declare const UniLifecycleHooks: { INIT: string; LOAD: string; SHOW: string; READY: string; }; export type RouterProxyMode = 'hook' | 'method' | 'not'; export interface RouterOptions { pageData: any; proxyMode?: RouterProxyMode; proxyMethods?: UniLifecycleHook[]; debugger?: DebuggerConfig; } export interface RouteLocationBase { animationType?: 'auto' | 'none' | 'slide-in-right' | 'slide-in-left' | 'slide-in-top' | 'slide-in-bottom' | 'fade-in' | 'zoom-out' | 'zoom-fade-out' | 'pop-in'; animationDuration?: number; } export interface RouteNameLocation extends RouteLocationBase { name: string; query?: Object; } export interface RoutePathLocation extends RouteLocationBase { path: string; query?: object; } export type RouteUrlLocation = string; export type RouteLocationRaw = RouteUrlLocation | RouteNameLocation | RoutePathLocation; export type NavTarget = { to: RouteLocationRaw; navType: NavType; }; export type BeforeEachResult = boolean | undefined | NavTarget; export interface Route { fullPath?: string; name?: string; path?: string; query?: Record; } export interface RouteRule { path: string; name?: string; redirect?: string | Function; alias?: string | Array; children?: Array; meta?: any; [propName: string]: any; } export type GuardHookRule = (to: Route, from?: Route) => void | Promise; export interface RouteRuleMap { nameMap: Record; pathMap: Record; } export interface OriRoute { path?: string; fullPath?: string; query?: Record; } export type LifeCycleHooks = Record>; export interface Router { readonly routes: RouteRule[]; readonly proxyMethods: string[]; readonly routeMap: RouteRuleMap; route?: Route; readonly lifeCycleHooks: LifeCycleHooks; readonly options: RouterOptions; $locked: boolean; readonly indexRouteRule: RouteRule; install(app: any, ...options: any[]): any; setupRouter(app: any): void; push(to: RouteLocationRaw): void; replace(to: RouteLocationRaw): void; replaceAll(to: RouteLocationRaw): void; pushTab(to: RouteLocationRaw): void; beforeEach(userGuard: GuardHookRule): void; afterEach(userGuard: GuardHookRule): void; }