/**
 * Server-side loader registry for GET-based fetching
 *
 * Loaders are loaded lazily via dynamic imports when first requested.
 * The RSC handler looks up loaders by $$id to execute them.
 */
import type { LoaderFn } from "../types.js";
import type { MiddlewareFn } from "../router/middleware.js";
interface RegisteredLoader {
    fn: LoaderFn<any, any, any>;
    middleware: MiddlewareFn[];
}
type LazyLoaderImport = () => Promise<{
    $$id: string;
}>;
/**
 * Set the lazy loader imports map (called by the loader manifest)
 */
export declare function setLoaderImports(imports: Record<string, LazyLoaderImport>): void;
/**
 * Register a fetchable loader by $$id
 * Called by createLoader when fetchable option is provided
 */
export declare function registerLoader(id: string, fn: LoaderFn<any, any, any>, middleware?: MiddlewareFn[]): void;
/**
 * Get a registered loader by $$id (synchronous)
 * Returns undefined if loader is not registered
 */
export declare function getLoader(id: string): RegisteredLoader | undefined;
/**
 * Get a loader by $$id, loading it lazily if needed
 * This is the primary method for the RSC handler to get loaders
 *
 * In production: IDs are hashed, looked up via the lazy import map
 * In dev: IDs are "filePath#exportName", resolved via dynamic import
 */
export declare function getLoaderLazy(id: string): Promise<RegisteredLoader | undefined>;
/**
 * Check if a loader is registered by $$id
 */
export declare function hasLoader(id: string): boolean;
/**
 * Get all registered loader IDs (for debugging)
 */
export declare function getRegisteredLoaderIds(): string[];
/**
 * Register a loader by its $$id (injected by Vite plugin)
 * This is called during module loading to cache loaders
 */
export declare function registerLoaderById(loader: {
    $$id: string;
    fn?: LoaderFn<any, any, any>;
}): void;
export {};
//# sourceMappingURL=loader-registry.d.ts.map