/**
 * Match API
 *
 * Extracted from createRouter closure. Contains match context creation functions
 * and the matchError function for error boundary resolution.
 */
import type { ErrorBoundaryHandler, ErrorInfo, MatchResult } from "../types";
import type { ReactNode } from "react";
import type { MatchContext } from "./match-context.js";
import type { MatchApiDeps, ActionContext } from "./types.js";
/**
 * Create match context for full requests (document/SSR).
 */
export declare function createMatchContextForFull<TEnv>(request: Request, env: TEnv, deps: MatchApiDeps<TEnv>, findInterceptForRoute: MatchApiDeps<TEnv>["findInterceptForRoute"]): Promise<MatchContext<TEnv> | {
    type: "redirect";
    redirectUrl: string;
}>;
/**
 * Create match context for partial requests (navigation/actions).
 */
export declare function createMatchContextForPartial<TEnv>(request: Request, env: TEnv, deps: MatchApiDeps<TEnv>, findInterceptForRoute: MatchApiDeps<TEnv>["findInterceptForRoute"], actionContext?: ActionContext): Promise<MatchContext<TEnv> | null>;
/**
 * Match an error to the nearest error boundary and return error segments.
 */
export declare function matchError<TEnv>(request: Request, _context: TEnv, error: unknown, deps: MatchApiDeps<TEnv>, defaultErrorBoundary: ReactNode | ErrorBoundaryHandler | undefined, segmentType?: ErrorInfo["segmentType"]): Promise<MatchResult | null>;
/**
 * Preview match - returns route middleware without segment resolution.
 */
export declare function previewMatch<TEnv>(request: Request, context: TEnv, deps: MatchApiDeps<TEnv>): Promise<{
    routeMiddleware?: Array<{
        handler: import("./middleware.js").MiddlewareFn;
        params: Record<string, string>;
    }>;
} | null>;
//# sourceMappingURL=match-api.d.ts.map