import type { ComponentType, ReactNode } from 'react'; /** * Route keys defined as const arrays - single source of truth. * Types are derived from these arrays. * ROUTES in config.ts uses Record<...Route, RouteNode> to enforce all keys are present. */ export declare const ROOT_ROUTE_KEYS: readonly ["create", "manage", "playground"]; export declare const CREATE_STEP_KEYS: readonly ["settings", "pipeline", "source", "dataset", "transformations", "review"]; export declare const SOURCE_SECTION_KEYS: readonly ["connectivity", "secrets", "configuration"]; export declare const MANAGE_TAB_KEYS: readonly ["dashboard", "metrics", "settings", "configuration", "dataset", "transformations", "dlq"]; export type RootRoute = (typeof ROOT_ROUTE_KEYS)[number]; export type CreateStepRoute = (typeof CREATE_STEP_KEYS)[number]; export type SourceSection = (typeof SOURCE_SECTION_KEYS)[number]; export type ManageTabRoute = (typeof MANAGE_TAB_KEYS)[number]; /** * Enforces that ROUTES has exactly the keys defined above. * If a key is missing or extra, TypeScript will error. */ export interface RoutesConfig { create: RouteNode & { children: Record; }; manage: RouteNode & { children: Record; }; playground: RouteNode; } /** * Props that all route components receive from Router */ export interface RouteComponentProps { /** Nested Router (if this route has children) */ children?: ReactNode; /** This route's label */ label?: string; /** Metadata about child routes (for building Stepper, Tabs, etc.) */ childSegments?: Array<{ segment: string; label: string; }>; /** Which child segment is currently active (for highlighting in Stepper/Tabs) */ activeChildSegment?: string; } /** * Route node definition in the centralized config */ export interface RouteNode { segment: TSegment; component: ComponentType; label?: string; children?: Record; defaultChild?: string; }