import type { IComponentRoute, IRedirectRoute, IResolverRoute, IRoute, IRouteMatch, IRouterSlot, PageComponent, PathFragment, RouterTree, IRoutingInfo } from '../model.js'; /** * Determines whether the path is active. * If the full path starts with the path and is followed by the end of the string or a "/" the path is considered active. * @param path * @param fullPath */ export declare function isPathActive(path: string | PathFragment, fullPath?: string): boolean; /** * Matches a route. * @param route * @param path */ export declare function matchRoute(route: IRoute, path: string | PathFragment): IRouteMatch | null; /** * Matches the first route that matches the given path. * @param routes * @param path */ export declare function matchRoutes(routes: IRoute[], path: string | PathFragment): IRouteMatch | null; /** * Returns the page from the route. * If the component provided is a function (and not a class) call the function to get the promise. * @param route * @param info */ export declare function resolvePageComponent(route: IComponentRoute, info: IRoutingInfo): Promise; /** * Determines if a route is a redirect route. * @param route */ export declare function isRedirectRoute(route: IRoute): route is IRedirectRoute; /** * Determines if a route is a resolver route. * @param route */ export declare function isResolverRoute(route: IRoute): route is IResolverRoute; /** * Traverses the router tree up to the root route. * @param slot */ export declare function traverseRouterTree(slot: IRouterSlot): { tree: RouterTree; depth: number; }; /** * Generates a path based on the router tree. * @param tree * @param depth */ export declare function getFragments(tree: RouterTree, depth: number): PathFragment[]; /** * Constructs the correct absolute path based on a router. * - Handles relative paths: "mypath" * - Handles absolute paths: "/mypath" * - Handles traversing paths: "../../mypath" * @param slot * @param path */ export declare function constructAbsolutePath(slot: IRouterSlot, path?: string | PathFragment): string; /** * Handles a redirect. * @param slot * @param route */ export declare function handleRedirect(slot: IRouterSlot, route: IRedirectRoute): void; /** * Determines whether the navigation should start based on the current match and the new match. * @param currentMatch * @param newMatch */ export declare function shouldNavigate(currentMatch: IRouteMatch | null, newMatch: IRouteMatch): boolean;