/**
 * Build-time Route Trie Construction
 *
 * Builds a serializable trie from the route manifest for O(path_length)
 * route matching at runtime. Each trie leaf embeds the route's ancestry
 * shortCodes for layout pruning.
 */
export interface TrieLeaf {
    /** Route name (e.g., "site.l1_500") */
    n: string;
    /** Static prefix of the entry (e.g., "/site") */
    sp: string;
    /** Ancestry shortCodes from root to route [M0L0, M0L0L0, M0L0L0R499] */
    a: string[];
    /** Optional param names (absent params get empty string value) */
    op?: string[];
    /** Constraint validation: paramName -> allowed values */
    cv?: Record<string, string[]>;
    /** Ordered param names for this route (positional) */
    pa?: string[];
    /** Trailing slash mode */
    ts?: string;
    /** Route has pre-rendered data available */
    pr?: true;
    /** Passthrough: handler kept in bundle for live fallback on unknown params */
    pt?: true;
    /** Response type for non-RSC routes (json, text, image, any) */
    rt?: string;
    /** Negotiate variants: response-type routes sharing this path */
    nv?: Array<{
        routeKey: string;
        responseType: string;
    }>;
    /** RSC-first: RSC route was defined before response-type variants */
    rf?: true;
}
export interface TrieNode {
    /** Route terminal at this node */
    r?: TrieLeaf;
    /** Static segment children */
    s?: Record<string, TrieNode>;
    /** Param child: { n: paramName, c: child node } */
    p?: {
        n: string;
        c: TrieNode;
    };
    /** Wildcard terminal: leaf + paramName */
    w?: TrieLeaf & {
        pn: string;
    };
}
/**
 * Build a route trie from build-time manifest data.
 *
 * @param routeManifest - Map of route name to full URL pattern
 * @param routeAncestry - Map of route name to ancestry shortCodes
 * @param routeToStaticPrefix - Map of route name to its entry's staticPrefix
 * @param routeTrailingSlash - Optional map of route name to trailing slash mode
 */
export declare function buildRouteTrie(routeManifest: Record<string, string>, routeAncestry: Record<string, string[]>, routeToStaticPrefix: Record<string, string>, routeTrailingSlash?: Record<string, string>, prerenderRouteNames?: Set<string>, passthroughRouteNames?: Set<string>, responseTypeRoutes?: Record<string, string>): TrieNode;
/**
 * Recursively insert segments into the trie.
 * For optional params, we add a terminal at the current node (param absent)
 * AND continue inserting into the param child (param present).
 */
/**
 * Extract ancestry map from a built trie by visiting all leaf nodes.
 * Returns { routeName: ancestryShortCodes[] } for every route in the trie.
 */
export declare function extractAncestryFromTrie(root: TrieNode): Record<string, string[]>;
//# sourceMappingURL=route-trie.d.ts.map