import { useState } from 'react' import { LayoutDashboard, Presentation } from 'lucide-react' import { PlatformTopology } from './PlatformTopology' import { PresentationView } from './PresentationView' import type { AgentAnim, WorkloadData } from '../../types' import { cn } from '../../lib/utils' import { subTabActive, subTabIdle } from '../../lib/tabActive' type PlatformTab = 'topology' | 'presentation' type Props = { workload: WorkloadData | null animations: Record selectedNodeId: string | null onNodeClick: (nodeId: string) => void pulse: boolean } const TABS: { id: PlatformTab; label: string; icon: typeof LayoutDashboard }[] = [ { id: 'topology', label: 'Topology', icon: LayoutDashboard }, { id: 'presentation', label: 'Presentation', icon: Presentation }, ] export function PlatformView({ workload, animations, selectedNodeId, onNodeClick, pulse }: Props) { const [tab, setTab] = useState('topology') return (
{TABS.map(({ id, label, icon: Icon }) => ( ))} {tab === 'presentation' && ( Live cluster deck ยท all running services )}
{tab === 'topology' ? ( ) : ( )}
) }