import type { ReactNode } from "react";
import type { ResolvedSegment } from "./types.js";
/**
 * Stable async wrapper component for route content
 * Using a module-level component ensures React sees the same component reference
 * across renders, preventing unnecessary remounts during actions.
 *
 * When content is a pending promise, React suspends and shows the nearest
 * Suspense fallback. When content is already resolved, it renders immediately
 * without suspension.
 *
 * @param segmentId - Stable ID from segment, used for consistent keys across renders
 */
export declare function RouteContentWrapper({ content, fallback, segmentId, }: {
    content: Promise<ReactNode>;
    fallback?: ReactNode;
    segmentId?: string;
}): ReactNode;
export declare function RouteContentWrapperCallback<T>({ resolve, fallback, children, }: {
    resolve: Promise<T> | T;
    fallback?: ReactNode;
    children: (data: T) => ReactNode;
}): ReactNode;
/**
 * LoaderBoundary - Client component that resolves loader promises and renders OutletProvider
 *
 * This component enables streaming with loaders by:
 * 1. Receiving loader promises (serializable across RSC boundary)
 * 2. Using React's use() to resolve them (triggers Suspense)
 * 3. Rendering OutletProvider with resolved data
 *
 * The callback logic lives inside this client component, avoiding the
 * "Functions are not valid as a child of Client Components" error.
 */
export interface LoaderBoundaryProps {
    loaderDataPromise: Promise<any[]> | any[];
    loaderIds: string[];
    fallback?: ReactNode;
    outletKey: string;
    outletContent: ReactNode;
    segment: ResolvedSegment;
    parallel?: ResolvedSegment[];
    children: ReactNode;
}
export declare function LoaderBoundary({ loaderDataPromise, loaderIds, fallback, outletKey, outletContent, segment, parallel, children, }: LoaderBoundaryProps): ReactNode;
//# sourceMappingURL=route-content-wrapper.d.ts.map