import BrainActivity from "./BrainActivity"; import FlyControls from "./FlyControls"; import FlyList from "./FlyList"; import type { FlyInstanceData } from "./useFlyLayout"; import type { LiveFlyPositions } from "./useLiveFlyState"; import { useStatusSnapshot } from "./useStatusSnapshot"; const EXPANDED_WIDTH = 280; const COLLAPSED_WIDTH = 36; interface SidePanelProps { flies: FlyInstanceData[]; selectedFlyId: string | null; onSelectFly: (id: string | null) => void; collapsed: boolean; onToggleCollapsed: () => void; joystickRef: React.RefObject<{ x: number; y: number }>; wingSlidersRef: React.RefObject<{ left: number; right: number }>; livePositionsRef: React.RefObject; flying: boolean; onToggleFlying: () => void; altitudeLevelIndex: number; onAltitudeChange: (index: number) => void; } export default function SidePanel({ flies, selectedFlyId, onSelectFly, collapsed, onToggleCollapsed, joystickRef, wingSlidersRef, livePositionsRef, flying, onToggleFlying, altitudeLevelIndex, onAltitudeChange, }: SidePanelProps) { const statusSnapshot = useStatusSnapshot(flies, livePositionsRef); return (
{!collapsed && ( )} {!collapsed && ( )} {!collapsed && ( )} {!collapsed && }
); }