import React from 'react'; import { Home, FileText } from 'lucide-react'; // ───────────────────────────────────────────────────────────────────────────── // Types // ───────────────────────────────────────────────────────────────────────────── export interface RouteConfig { /** Relative or absolute navigation path */ path: string; /** Display label (used in sidebar and breadcrumbs) */ label: string; /** Leading icon component */ icon: React.ComponentType; /** Optional page component (not used by the sidebar directly) */ component?: React.ComponentType; } // ───────────────────────────────────────────────────────────────────────────── // Navigation routes — single source of truth for the devops app // ───────────────────────────────────────────────────────────────────────────── export const routes: RouteConfig[] = [ { path: '/home', label: 'Home', icon: Home }, { path: '/template', label: 'Template', icon: FileText }, ]; // ───────────────────────────────────────────────────────────────────────────── // Helpers // ───────────────────────────────────────────────────────────────────────────── export const getRouteByPath = (path: string): RouteConfig | undefined => routes.find(route => route.path === path); export const isValidRoute = (path: string): boolean => routes.some(route => route.path === path);