import type { ReactElement } from 'react';
import { type ApplicationDto, type ModuleDto } from '@/contexts/NavigationContext';
/**
 * A module is "landable" when navigating to its route resolves to a terminal:
 * it has its own registered component, OR at least one section (every section
 * leads to a terminal — a component, a redirect to its first resource, or a
 * MissingComponentPage). A module with neither redirects up to the app index
 * (`Navigate to ".."`), so it must never be chosen as an index redirect target —
 * otherwise the app index and the module index ping-pong forever.
 */
export declare function isModuleLandable(mod: ModuleDto): boolean;
/**
 * Build route elements for a single application and its children.
 * Handles application index, module routes, and application-level feature gating.
 *
 * Three-branch decision for the index route when no app component is registered:
 *   1. Component registered → render at index.
 *   2. Modules non-empty → redirect to first LANDABLE module (avoids the app↔module
 *      redirect loop when the first module was filtered to empty); AccessDenied when
 *      no module is landable.
 *   3. Otherwise → MissingComponentPage at index.
 */
export declare function buildApplicationRoutes(app: ApplicationDto): ReactElement[];
/**
 * Returns static legacy redirect routes for a specific application.
 * These are in-app redirects that cannot come from the DB menu.
 *
 * MAINTENANCE: These redirects exist for backwards-compatibility with
 * bookmarks and external links created before route restructuring.
 * Each redirect maps an old URL pattern to its new location.
 * Remove individual redirects only after confirming no active references.
 */
export declare function getStaticAppRoutes(appCode: string): ReactElement[];
/**
 * DynamicRouter — Generates React Router routes from the navigation API + PageRegistry.
 *
 * Architecture:
 * - Static routes (auth, docs, home, 404) are hardcoded and always available
 * - Dynamic routes come from the enriched /api/navigation/menu response
 * - Components are resolved via PageRegistry (supports lazy loading)
 * - Implicit routes (detail, create, edit) are auto-generated from conventions
 * - Module-level feature gating wraps modules with requiredFeature
 * - Auto-redirects are generated for modules/sections without index components
 * - Outlet-based tab sections (Settings, AppSettings) resolve tabs from PageRegistry
 * - Multi-tenant routes (/t/:slug/*) are handled via a single route tree (no duplication)
 *
 * This component replaces both the inline routes in App.tsx and smartstackRoutes.tsx,
 * eliminating the route duplication between tenant/standard paths.
 */
export declare function DynamicRouter(): ReactElement;
//# sourceMappingURL=DynamicRouter.d.ts.map