'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; const mlflowUrl = process.env.NEXT_PUBLIC_MLFLOW_URL ?? '/mlflow'; const airflowUrl = process.env.NEXT_PUBLIC_AIRFLOW_URL ?? '/airflow'; type NavItem = | { href: string; label: string; external?: false } | { href: string; label: string; external: true }; const NAV: NavItem[] = [ { href: '/', label: 'Overview' }, { href: '/users', label: 'Users' }, { href: '/events', label: 'Events' }, { href: '/features', label: 'Features' }, { href: '/tips', label: 'Rec log' }, { href: '/reward-analytics', label: 'Rewards' }, { href: '/experiments', label: 'MLOps' }, { href: '/simulations', label: 'Simulations' }, { href: '/models', label: 'Models' }, { href: '/data-quality', label: 'Data quality' }, { href: '/ops', label: 'Ops' }, { href: '/sql', label: 'SQL runner' }, { href: '/health', label: 'Health' }, { href: '/audit', label: 'Audit log' }, { href: '/docs', label: 'Docs' }, ]; const NAV_EXTERNAL: NavItem[] = [ { href: mlflowUrl, label: 'MLflow ↗', external: true }, { href: airflowUrl, label: 'Airflow ↗', external: true }, ]; export function AdminShell({ children }: { children: React.ReactNode }) { const pathname = usePathname(); return (