import type { PageAuth, LayoutConfig } from '@donotdev/core';
import type { ComponentType } from 'react';
/** Lazy-loadable page component factory or Vite glob string reference */
type PageComponentFactory = (() => Promise<{
    default: ComponentType;
}>) | string;
/**
 * Route group from useRouteDiscovery
 */
export interface RouteGroup {
    label: string;
    icon?: unknown;
    routes: Array<RouteGroupEntry>;
}
/** Minimal route entry shape accepted by createAppRouter */
export interface RouteGroupEntry {
    path: string;
    component: PageComponentFactory;
    auth?: boolean | PageAuth;
    label?: string;
    importPath?: string;
    exportName?: string;
    meta?: unknown;
    icon?: unknown;
}
/**
 * Options for createAppRouter
 */
interface CreateAppRouterOptions {
    /** Route groups from useRouteDiscovery() */
    routeGroups: RouteGroup[];
    /** Optional base URL for all locations */
    basename?: string;
    /** Optional layout configuration */
    layout?: LayoutConfig;
}
/**
 * createAppRouter - Router Factory Function
 *
 * Creates a configured React Router instance with automatic route discovery,
 * authentication, lazy loading, and error handling.
 *
 * This factory function replaces the component-based approach with React Router v7's
 * data router pattern (createBrowserRouter). It discovers routes at creation time
 * and returns a router instance ready for use with RouterProvider.
 *
 * Features:
 * - Automatic route discovery from filesystem
 * - Lazy loading with code splitting
 * - Authentication integration via AuthGuard
 * - SEO-friendly root route
 * - Native scroll restoration
 * - Optional layout wrapper integration
 *
 * @param options - Router configuration options
 * @returns Configured router instance for RouterProvider
 *
 * @example
 * ```tsx
 * const groups = useRouteDiscovery();
 * const router = createAppRouter({
 *   routeGroups: groups
 * });
 * <RouterProvider router={router} />
 * ```
 *
 * @example
 * ```tsx
 * // With basename and layout config
 * const groups = useRouteDiscovery();
 * const router = createAppRouter({
 *   routeGroups: groups,
 *   basename: '/app',
 *   layout: { header: () => <CustomHeader /> }
 * });
 * <RouterProvider router={router} />
 * ```
 */
export declare function createAppRouter(options: CreateAppRouterOptions): import("react-router-dom").DataRouter;
export {};
//# sourceMappingURL=AppRoutes.d.ts.map