import type { InjectionToken } from '@angular/core'; import type { Route } from '@angular/router'; import type { Join, NoTail } from '@bespunky/typescript-utils'; import type { _NavigatorXToken_, _RouteComposer_ } from '../_navigation-x.symbols'; import type { RouteComposer } from '../route-composer/router-composer'; import type { AutoNavigateRouteMethods } from './auto-navigator-methods.types'; import type { RouteComposerName } from './route-composer.types'; import type { CombinedPath, RouteSegments } from './route-paths.types'; export interface ReadonlyRoute extends Readonly> { /** * ### navigation-x property * * Sets the contextual name for the route. This name will replace the method name automatically generated by `useNavigationX()`. * * If you have a deep route, for example `theaters/:theaterId/shows/:showId`, the navigation method will automatically be named something like: * `toTheatersTheaterIdShowsShowId()`. * * Specifying `friendlyName: 'ShowDetails'` for example, will make your navigation method receive the name `toShowDetails()`, which is nicer to read * and gives context as to where you're navigating to. * * @type {FriendlyName} */ readonly friendlyName?: FriendlyName; readonly path?: PathSegment; readonly children?: Children; } declare type MaxRouteChildrenDepth = 15; export declare type DeepReadonlyRouteChildren = []> = readonly ReadonlyRoute>[]; export interface WithRouteComposer { readonly [_RouteComposer_]: RouteComposer; } export interface WithNavigationX { readonly [_NavigatorXToken_]: InjectionToken>; } export declare type ComposableRoutesArray = RouteArray extends readonly [infer First, ...infer Rest] ? First extends ReadonlyRoute ? readonly [ ComposableRoute>, ...ComposableRoutesArray ] : [] : []; export declare type ComposableRoute, Entity, Root extends string> = Route extends ReadonlyRoute ? ReadonlyRoute & WithRouteComposer, RouteComposerName>> : never; export declare type NavigationXRoute> = ComposableR extends ComposableRoute ? ComposableR & WithNavigationX> & string[], '/'>> : never; export {};