/**
 * `GET /api/file/<path>` — the File view in one round-trip.
 *
 * Three panes: what imports this file, the file's own outline in source order,
 * and what this file imports. All of it comes from four batched queries — the
 * file's nodes, their `contains` edges, their `imports` edges in each
 * direction — never a query per symbol.
 *
 * Two things worth knowing about `imports` edges before reading the mapping
 * below. First, they point at the *symbol* that was imported, not at the file
 * holding it, so file granularity means mapping each edge's endpoint through
 * `nodes.file_path`. Second, plenty of them stay inside one file (an import
 * declaration is a node in the importing file), so the same-file ones have to
 * be dropped or every file appears to import itself.
 *
 * The rails would still read as broken without the third piece: imports that
 * never resolved. A file importing `react`, `fs` and one local module would
 * otherwise show a single row, silently implying the other two do not exist.
 * They are listed separately, as what they are — outside the index.
 */
import type { CodeGraph } from '../../index';
import type { Node } from '../../types';
import { type WireNodeRef } from './wire';
/** A row in the file outline. */
export interface WireOutlineEntry extends WireNodeRef {
    /** Containing symbol within this file, or null for a top-level one. */
    parentId: string | null;
    /** Nesting depth from the top level of the file, starting at 0. */
    depth: number;
    /** Incoming / outgoing edge counts — the `← in  → out` column. */
    fanIn: number;
    fanOut: number;
}
/** One end of the File view's import rails. */
export interface WireImportRow {
    file: string;
    test: boolean;
    /** Which symbols the edges name, capped. */
    symbols: Array<{
        id: string;
        name: string;
        kind: string;
        line: number;
    }>;
    symbolCount: number;
}
export declare function buildFile(cg: CodeGraph, projectRoot: string, requested: string): unknown;
/**
 * A file's symbols in source order, nested under their container.
 *
 * Extracted so the whole-file source view (`/api/filecode`) draws the same rows
 * as the outline view rather than a second, subtly different reading of the
 * same `contains` edges — an outline rail whose line numbers disagreed with the
 * source beside it would be worse than no rail.
 *
 * Four batched queries whatever the file holds: its nodes are already in hand,
 * their `contains` edges, and fan-in / fan-out for the whole set at once.
 *
 * @returns the capped rows and the TRUE symbol count, which is what a header
 *          has to print — see `wireList`.
 */
export declare function buildOutlineEntries(cg: CodeGraph, nodes: readonly Node[]): {
    entries: WireOutlineEntry[];
    total: number;
};
//# sourceMappingURL=file.d.ts.map