/**
 * Expo Router (React Native) — file-based screens and string-keyed navigation.
 *
 * Two things static extraction cannot see on its own, and that together are
 * most of what "how does the app flow" means in an Expo app:
 *
 * 1. **A screen is a file, not a symbol.** Every file under `app/` (or
 *    `src/app/`) is a route: `app/object-detail.tsx` is `/object-detail`,
 *    `app/capture/index.tsx` is `/capture`, `app/item/[id].tsx` is `/item/[id]`,
 *    and `(group)` directories are invisible in the URL. `extract()` emits one
 *    `route` node per screen file, named by its path, with a `calls` ref to the
 *    file's default export so the route reaches the component that renders it.
 *
 * 2. **Navigation is a string.** `router.push('/object-detail?…')`,
 *    `router.navigate({ pathname: '/item/[id]', params })`, a template literal
 *    with the params interpolated — the extractor records each as a `calls` ref
 *    named `router.push` that resolves to nothing, because the target is a
 *    path, not an identifier. `resolve()` claims those refs, reads the argument
 *    off the source lines, matches it against the route table, and returns a
 *    **`navigates`** edge to the route node, carrying the href it read.
 *
 * Between them the graph gains `ItemCard → openObjectDetail → /object-detail →
 * ObjectDetail`, which is the chain a reader asking "where does tapping an
 * object go" needs and previously got "no path" for.
 *
 * Precision rests on the string resolving to a real screen file, not on the
 * receiver being called `router`: `nav.push('/x')` from `const nav =
 * useRouter()` binds, `list.push('/x')` where no such route exists does not.
 * Anything the resolver cannot bind to exactly one screen — a computed path,
 * an ambiguous dynamic match, a relative href from a non-screen file — is left
 * unresolved rather than guessed. Silent beats wrong.
 *
 * Not covered yet (each needs the enclosing component, which `extract()` does
 * not receive): `<Link href>`, `<Redirect href>`, and `Stack.Screen` /
 * `Tabs.Screen` `name` props. `router.back()` / `dismiss()` have no target and
 * are correctly skipped.
 */
import type { Node } from '../../types';
import type { FrameworkResolver, ResolutionContext } from '../types';
/** Files under `app/` that define a screen (not a layout, not test, not html). */
export declare function routePathForFile(filePath: string): string | null;
/**
 * An API route's path — `app/blog/og-image/[post]+api.ts` is
 * `/blog/og-image/:post`, written the way every server route is so a
 * client's `fetch('/blog/og-image/…')` can find it. Null for any other file.
 */
export declare function apiRoutePathForFile(filePath: string): string | null;
/**
 * The name the file exports as its screen. Expo renders the DEFAULT export,
 * so that is the only binding that matters; a wrapper (`memo(Screen)`,
 * `observer(Screen)`, `React.forwardRef(Screen)`) is looked through to its
 * first identifier argument. Anonymous defaults (`export default () => …`)
 * have no name to bind and yield null.
 */
export declare function defaultExportName(stripped: string): {
    name: string;
    index: number;
} | null;
/**
 * The `router` methods that take a destination (`back`/`dismiss` take none),
 * and a project's own wrappers around them: `safePush('/x')`,
 * `guardedNavigate('/x')` — a camelCase name ending in the verb. A wrapper
 * usually defers the real call through state the graph cannot follow
 * (`pendingNav = { method, href }` … `router[method](href)`), so its NAME is
 * the only static evidence; the argument resolving to a real screen is what
 * makes the claim safe. Second group: the verb, when it came from a wrapper.
 */
export declare const NAV_METHOD: RegExp;
/** The verb a NAV_METHOD match names, lower-cased: `safePush` → `push`. */
export declare function navVerb(name: string): string | null;
/** Placeholder for an interpolated `${…}` inside a template-literal href (shared with the cross-tier synthesizer). */
export declare const HOLE = "\0";
/** Index of the quote that closes the string literal opening at `at` (or the end of `s`). */
export declare function stringEnd(s: string, at: number): number;
/**
 * A string literal (`'…'`, `"…"`, or a template) starting at `at`, as text
 * with every `${…}` replaced by {@link HOLE}. Null when `at` is not a string.
 */
export declare function readStringAt(s: string, at: number): string | null;
export interface HrefLiteral {
    /** The path part, `${…}` holes kept as {@link HOLE}; query and hash removed. */
    path: string;
    /** The literal as written, holes rendered as `${…}` — for the edge metadata. */
    display: string;
    /**
     * The OTHER destinations, when the argument was a conditional. A link
     * written `!isAdmin ? keyword ? '/search/…' : '/page/…' : '/admin/…'` names
     * three places a user can end up, and each is drawn.
     */
    alternates?: HrefLiteral[];
}
/** Every destination an href names — itself first, then its other arms. */
export declare function hrefArms(href: HrefLiteral): HrefLiteral[];
export declare function toHref(literal: string | null): HrefLiteral | null;
export declare function parseHrefExpression(expr: string): HrefLiteral | null;
/**
 * The destination of the navigation call at (`line`, `column`) in `lines`.
 *
 * Handles the three shapes Expo Router accepts: a string, a template literal
 * (static prefix kept, interpolations become holes), and an `Href` object
 * whose `pathname` is one of those. Anything else — a variable, a call, a
 * spread — is not a literal and returns null.
 */
export declare function readHrefArgument(lines: readonly string[], line: number, column: number, method: string): HrefLiteral | null;
/** The source text of the navigation call's first argument, or null when there is no call there. */
export declare function firstArgumentText(lines: readonly string[], line: number, column: number, method: string): string | null;
/**
 * The source text of a call's nth argument (0-based), or null when there is
 * no call there or it has too few arguments.
 *
 * Most navigation calls put the destination first; SvelteKit's
 * `redirect(303, '/login')` puts the status there, so the reader has to be
 * able to take the second. A `,` at depth 0 separates arguments — inside
 * parens, brackets, braces or a template it is part of one.
 */
export declare function nthArgumentText(lines: readonly string[], line: number, column: number, method: string, index: number): string | null;
/**
 * The href a navigation call reaches through a local variable:
 *
 *   const href = params.length ? `/barcode-scan?${q}` : '/barcode-scan'
 *   router.navigate(href as any)
 *
 * When the argument is a bare identifier, its most recent `const`/`let`
 * declaration between `enclosingStart` and the call is read and its
 * initializer parsed exactly like a literal argument would be. A reassignment
 * in between, or an initializer that is not static, yields null.
 */
export declare function readHrefViaLocal(lines: readonly string[], line: number, column: number, method: string, enclosingStart: number): HrefLiteral | null;
/**
 * A route table split by the app each route belongs to.
 *
 * One table for a whole repository is wrong the moment the repository holds
 * more than one app: every app has a `/`, most have a `/login`, and a global
 * `exact` map keeps whichever was indexed first — so a `<Link to="/posts">`
 * in one app resolves to another app's `/posts`. Measured on the TanStack
 * Router monorepo (477 apps in one index): **82% of navigations pointed at a
 * route belonging to a different app.** Gating on the roots decides only
 * WHETHER to resolve; the table has to decide WHICH app's routes to match.
 */
export interface RootedRouteTable<T extends RouteTable = RouteTable> {
    /** Identity of the node array the table was built from — rebuild when it changes. */
    source: readonly Node[];
    /** App root (`apps/web/`, `''`) → the routes that app serves. */
    byRoot: Map<string, T>;
}
/**
 * The routes of the app `filePath` belongs to, or null when it is under none.
 *
 * Longest root wins, so an app nested inside another resolves to the nested
 * one; a root of `''` is a single-app repo, and covers every file.
 */
export declare function routesForFile<T extends RouteTable>(table: RootedRouteTable<T>, filePath: string): T | null;
/** Register `path` → `node` in one app's table. The first route to claim an address keeps it. */
export declare function addRouteTo(table: RouteTable, path: string, node: Node): void;
/**
 * The directory the app owning `filePath` lives in — what a navigation call is
 * gated on, so a `push` in one package of a monorepo cannot name another
 * package's routes.
 *
 * The first conventional source directory ends it: proshop keeps its routes in
 * `frontend/src/App.js` and its screens in `frontend/src/screens/`, so the root
 * is `frontend/`; `src/routes/login/+page.svelte` and `pages/index.vue` are
 * both a repo-root app, whose root is `''` — every file, exactly as a Next app
 * at the repo root is. A file under no such directory owns only its own folder.
 */
export declare function appRootFor(filePath: string): string;
interface RouteEntry {
    node: Node;
    segs: string[];
}
export interface RouteTable {
    /** Identity of the node array the table was built from — rebuild when it changes. */
    source: readonly Node[];
    exact: Map<string, Node>;
    dynamic: RouteEntry[];
}
export declare function routeTable(context: ResolutionContext): RouteTable;
/**
 * Normalize an href path to the form route names use: leading `/`, no
 * trailing `/`, no `(group)` segments, holes as a whole-segment `*`.
 * A relative href is resolved against the screen the call sits in; from a
 * non-screen file it has no base and returns null.
 */
export declare function normalizeHrefPath(path: string, fromFile: string): string[] | null;
/**
 * The single route the href segments denote, or null when none or several do.
 *
 * Scored so that a literal segment beats a wildcard for the same slot and a
 * `[param]` slot accepts either; a tie between two routes is ambiguity, and
 * ambiguity is a null, not a coin flip.
 */
export declare function matchRoute(segs: string[], table: RouteTable): Node | null;
export declare const expoRouterResolver: FrameworkResolver;
export {};
//# sourceMappingURL=expo-router.d.ts.map