import type { EmptyObjectPatch } from 'tslang'; import type { GeneralParamDict, RouteMatchShared, RouteMatchSharedToParamDict } from './route-match'; import type { Router, RouterNavigateOptions } from './router'; export interface RouteBuilderBuildingPart { route: RouteMatchShared; params?: GeneralParamDict; } export type RouteBuilderSourceType = 'current' | 'next' | 'none'; export declare class RouteBuilder { private router; private sourceType; private buildingParts; private leavingGroupSet; constructor(router: Router, sourceType: RouteBuilderSourceType, buildingParts?: (RouteBuilderBuildingPart | string)[], leavingGroupSet?: Set); /** * Route of the first building part if available. */ get $route(): RouteMatchShared | undefined; $(route: TRouteMatchShared, params?: Partial> & EmptyObjectPatch): RouteBuilder; $(part: string): RouteBuilder; $leave(groups: TGroupName | TGroupName[]): RouteBuilder; $ref(): string; $href(): string; /** * Perform a `history.push()` with `this.$ref()`. */ $push(options?: RouterNavigateOptions): void; /** * Perform a `history.replace()` with `this.$ref()`. */ $replace(options?: RouterNavigateOptions): void; }