import type { Join, NoTail } from '@bespunky/typescript-utils'; import type { ComposableRoute, DeepReadonlyRouteChildren, ReadonlyRoute, WithNavigationX } from './types/composable-routes.types'; import type { RouteSegments } from './types/route-paths.types'; export declare const autoNavigatorNameSeparator = ""; interface RouteConfigurator { /** * Generates a strongly-typed navigation-x route. * Pass the result to either `provideRouterX()` or `provideRoutesX()` and you'll be able to call `useNavigationX()` * with the route tree you specified. * * ❕ Remember to pass the route config `as const`. * * @template Segment The strong-typed path property of the route segment. * @template FriendlyName The strong-typed friendly name for the route segment. Taken from the `friendlyName` proeprty. * @template Children The strong-typed children of the route segment. * @param {ReadonlyRoute} route The route config to strong-type. Remember to pass it in use `as const`. * @return */ route: (route: ReadonlyRoute) => ComposableRoute & WithNavigationX; /** * Generates a strongly-typed navigation-x route with a predefined path prefix. * Pass the result to either `provideRouterX()` or `provideRoutesX()` and you'll be able to call `useNavigationX()` * with the route tree you specified. * * ❕ Remember to pass the route config `as const`. * * @template Segment The strong-typed path property of the route segment. * @template FriendlyName The strong-typed friendly name for the route segment. Taken from the `friendlyName` proeprty. * @template Children The strong-typed children of the route segment. * @template Root The strong-typed url prefix for all routes in the tree. * @param {ReadonlyRoute} route The route config to strong-type. Remember to pass it in use `as const`. * @param {Root} root The url prefix all routes in this config tree start from. * @return */ prefixedRoute: (route: ReadonlyRoute, root: Root) => ComposableRoute & WithNavigationX> & string[], '/'>>; } /** * Creates a strongly-typed configurator for Angular routes. * * Call this with an entity, then generate a strongly typed Angular route config tree using one of the * configurator's functions. * * Store the generated route somewhere and use `provideRouterX()` or `provideRoutesX()` to tell Angular about it. * * @export * @template Entity The entity (or data structure) route arguments should match with. * @return {RouteConfigurator} An object which allows generating strongly typed routes. */ export declare function routeConfigFor(): RouteConfigurator; export {};