/**
 * Represents information about a route in the application.
 * Matches the structure of React Router's RouteObject.
 */
export interface RouteInfo {
    path?: string;
    id?: string;
    index?: boolean;
    children?: RouteInfo[];
}
/**
 * Manages reading and extracting routes from Runtime router configuration.
 * Supports auto-discovery from common locations and explicit router paths.
 */
export declare class RouterReader {
    /**
     * Common locations where router configuration files are typically found.
     * Checked in order during auto-discovery.
     */
    private readonly commonRouterPaths;
    /**
     * Reads router configuration and extracts all routes.
     * Supports both explicit router path and auto-discovery.
     *
     * @param routerPath - Optional explicit path to router configuration file
     * @returns Promise resolving to array of route information
     * @throws Error if router configuration cannot be found or loaded
     */
    readRoutes(routerPath?: string): Promise<RouteInfo[]>;
    /**
     * Resolves an explicit router path to an absolute path.
     *
     * @param routerPath - Relative or absolute path to router file
     * @returns Absolute path to router file
     * @throws Error if file does not exist
     */
    private resolveRouterPath;
    /**
     * Discovers router configuration from common locations.
     * Checks each common path in order and returns the first match.
     *
     * @returns Absolute path to discovered router file, or null if not found
     */
    private discoverRouterPath;
    /**
     * Dynamically imports router module and extracts routes.
     * Supports various export patterns:
     * - Default export of RuntimeRouter instance
     * - Default export of router configuration object
     * - Named export 'router' or 'routes'
     *
     * @param filePath - Absolute path to router file
     * @returns Promise resolving to array of routes
     * @throws Error if router cannot be imported or routes cannot be extracted
     */
    private importRouterFromPath;
    /**
     * Recursively flattens nested route tree into a flat array.
     * Preserves all route information including children for reference.
     *
     * @param routes - Array of routes to flatten
     * @returns Flat array of all routes including nested children
     */
    flattenRoutes(routes: RouteInfo[]): RouteInfo[];
    /**
     * Checks if a file is a TypeScript file (.ts or .tsx).
     *
     * @param filePath - Path to check
     * @returns True if file has .ts or .tsx extension
     */
    private isTypeScriptFile;
    /**
     * Transpiles a TypeScript file to JavaScript using esbuild.
     * Creates a temporary file with the transpiled output.
     *
     * @param filePath - Absolute path to TypeScript file
     * @returns Path to transpiled JavaScript file
     * @throws Error if transpilation fails
     */
    private transpileTypeScript;
}
