import { HoistModel, HoistRoute } from '../core'; import { Router, State } from 'router5'; import 'router5-plugin-browser'; /** * Top-level model for managing application routing in Hoist. * * This observable model uses Router5 (https://router5.js.org/) to manage the * underlying routes, presenting them to the application as a set of MobX observables. */ export declare class RouterModel extends HoistModel { /** Router5 state object representing the current state. */ currentState: State; /** Underlying Router5 Router object implementing the routing state. */ router: Router; /** * Does the routing system already have a given route? */ hasRoute(routeName: string): boolean; /** * Add routes to the router. * * @param routes - collection of {@link HoistRoute} specs. In addition to the standard Router5 * route config, each spec supports an `omit` keyword to allow declarative exclusion. * Otherwise these are Router5 configs to be passed directly to the Router5 API. */ addRoutes(routes: HoistRoute[]): void; /** * Add a routeName to the current route, preserving params * @param routeName - the routeName to append * @param newParams - additional params for this routeName to be merged with existing params. */ appendRoute(routeName: string, newParams?: object): import("router5/types/types/base").CancelFn; /** * Remove last routeName from the current route, preserving params */ popRoute(): import("router5/types/types/base").CancelFn; constructor(); private setCurrentState; private getRouteNames; private createRouter; private preprocessRoutes; }