/**
 * Angular Router — routes declared in `Routes` arrays, navigation written as
 * command arrays.
 *
 *   export const routes: Routes = [
 *     { path: 'login', component: AuthComponent },
 *     { path: 'article/:slug', loadComponent: () => import('./article.component') },
 *     { path: 'editor', children: [{ path: ':slug', loadComponent: … }] },
 *     { path: 'profile', loadChildren: () => import('./profile/profile.routes') },
 *   ];
 *
 * `extract()` reads every such array — typed `Routes` / `Route[]`, passed to
 * `RouterModule.forRoot/forChild(…)` or `provideRouter(…)`, or a routes
 * file's `export default [...]` — into one `route` node per screen, named by
 * its path the way every other framework's routes are. Angular paths are
 * relative: a child's path joins its parent's, and a `loadChildren` file's
 * routes sit under the path that lazy-loads them, which only a cross-file
 * pass can know — so `extract()` names a routes file's routes as if it were
 * mounted at `/`, and `postExtract()` puts each under its mount (following an
 * NgModule `loadChildren` through to the routing module it imports).
 *
 * A route with `children` is a layout, not a screen: its component renders
 * an outlet the children fill, and the `''` child is the screen at its
 * address. It is a screen only when no child claims that address. A
 * `redirectTo` entry and a `**` catch-all are not screens either.
 *
 * A path written as a constant (`path: internalRoutes.account.path`) is read
 * from the object the constant names, `$localize` defaults included, in the
 * same cross-file pass.
 *
 * A route binds to its component with a `references` edge — `route-roots.ts`
 * takes a class as the handler a resolver named. A lazy `loadComponent`
 * names a file, and its component is the `@Component` class that file
 * exports.
 *
 * **Navigation is a command array.** `router.navigate(['/article', slug])`
 * is `/article/${…}`; `navigateByUrl('/login')`, a guard's
 * `router.createUrlTree(['/login'])` and `parseUrl('/login')` name a path the
 * way every other router's calls do. A relative navigation (`relativeTo`) is
 * left unresolved rather than guessed. `routerLink` is markup, read by
 * `angular-template-synthesizer.ts`.
 */
import type { Node } from '../../types';
import type { FrameworkResolver, ResolutionContext } from '../types';
import { type HrefLiteral, type RootedRouteTable, type RouteTable } from './expo-router';
/** The component a route names: a class in scope, or a lazily imported file's (`name` null = its default export). */
export type AngularComponentRef = {
    name: string;
    spec: null;
} | {
    name: string | null;
    spec: string;
};
export interface AngularRoute {
    /** `/editor/:slug` within this file; a constant path segment is kept as `{expr}` until the cross-file pass reads it. */
    path: string;
    line: number;
    component: AngularComponentRef | null;
    /** The layouts the screen renders inside, outermost first: each ancestor route's component, around its `<router-outlet>`. */
    layouts: AngularComponentRef[];
}
export interface AngularRedirect {
    /** `/` within this file. */
    from: string;
    /** Where it sends the user, within this file — or, when `absolute`, in the app: `/home`. */
    to: string;
    absolute: boolean;
}
export interface AngularMount {
    /** Where the lazily loaded routes sit within this file: `/profile`. */
    prefix: string;
    /** The `loadChildren` import: `./profile/profile.routes`. */
    spec: string;
    line: number;
}
/** A `$localize` tagged template's default text: `` $localize`:kebab-case@@routes.about:about` `` is `about`. */
export declare function localizeDefault(text: string): string | null;
/**
 * A string written statically: a literal, a `$localize` default, or `+`
 * between those — `'/' + $localize`:…:about``, as Ghostfolio builds its
 * links. Null when any part is computed.
 */
export declare function staticString(text: string): string | null;
/**
 * Every screen and lazy mount a file's routes arrays declare. Entries are
 * walked as objects (`object-literal.ts`), never read out of a window of
 * text: `path` may be written after `component`.
 */
export declare function parseAngularRoutes(content: string): {
    routes: AngularRoute[];
    mounts: AngularMount[];
    redirects: AngularRedirect[];
};
/** True for a route node this resolver emitted. */
export declare function isAngularRoute(node: Node): boolean;
/** The `@Component` classes a file declares, in order, with whether each is the default export. */
export declare function componentClassesIn(content: string): Array<{
    name: string;
    isDefault: boolean;
    decoratorAt: number;
}>;
/**
 * The source text a constant member chain names — `internalRoutes.account.path`
 * is the `path:` field of `account` in `export const internalRoutes = {…}` —
 * read from the file the chain's root is imported from (or declared in).
 */
export declare function constantText(expr: string, fromFile: string, context: ResolutionContext): string | null;
export type AngularRouteTable = RootedRouteTable;
export declare function angularRouteTable(context: ResolutionContext): AngularRouteTable;
/**
 * The routes a file navigates among: its app's, or — for a shared library
 * outside any app (an Nx `libs/ui`) — the one app's, when there is only one.
 */
export declare function angularRoutesFor(table: AngularRouteTable, filePath: string): RouteTable | null;
/** The destination a command array names: `['/article', slug]` is `/article/${…}`; null when it is relative or not a literal array. */
export declare function commandsHref(text: string, fromRoot?: boolean): HrefLiteral | null;
/**
 * The href, when it names at least one segment of its own. A path made only
 * of holes (`[\`/${a}\`, b, c]`) would match any route of its length — a
 * hole scores against a literal segment — so it names nothing.
 */
export declare function namesSomewhere(href: HrefLiteral | null): HrefLiteral | null;
/** A class property's initializer, read from its body: `routerLinkAbout = publicRoutes.about.routerLink;`. */
export declare function propertyInitializer(owner: Node, name: string, content: string): string | null;
/**
 * Where an Angular destination expression leads — the argument of
 * `router.navigate(…)`, or a `[routerLink]` binding:
 *
 * - a command array, `['/article', slug]`;
 * - a static string, `'/login'` or `'/' + $localize…`, and `'/editor/' + slug`;
 * - a route constant, `internalRoutes.zen.routerLink`;
 * - a property of the class it is written in, `this.routerLinkAbout`,
 *   holding one of those;
 * - any of those `.concat(id)`, one more segment.
 *
 * `owner` is the class the expression is written in, for `this.` properties.
 */
export declare function angularDestination(expr: string, file: string, owner: Node | null, context: ResolutionContext, depth?: number, fromRoot?: boolean): HrefLiteral | null;
export declare const angularRouterResolver: FrameworkResolver;
/** For the template synthesizer: a template file's path, from the component file that names it. */
export declare function templatePathFor(componentFile: string, templateUrl: string): string;
//# sourceMappingURL=angular-router.d.ts.map