// Info Column // Purpose: Defines the Info Column module and the local helpers/components used in this file. // Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit. import RoverMediaPlayer from '../../../components/RoverMediaPlayer/index.jsx'; import BatteryBar from '../../../components/BatteryBar/index.jsx'; import RoverLabel from '../../../components/RoverLabel/index.jsx'; import RoverHelpOverlay from '../../../components/RoverHelpOverlay/index.jsx'; import AutoFitText from '../../../components/AutoFitText/index.jsx'; import { getBatteryVisual } from '../utils.js'; export default function InfoColumn({ rover, frame, driverLabel, sessionInfo, videoMode = 'snapshot', snapshotFeed, withDivider = false, showPreview = true, variant = 'stacked', }) { const batteryVisual = getBatteryVisual({ rover, frame }); const batteryPercent = batteryVisual?.available ? batteryVisual.percentDisplay : null; const isActiveView = variant === 'active'; return (
{/* In the side-by-side roster this column is the rover's complete tile. The active carousel already overlays its video pane, so suppressing a second copy here avoids flashing HELP twice for the same rover. */} {isActiveView ? (
{driverLabel ? (
{driverLabel}
) : (
)}
{batteryPercent == null ? '--%' : `${batteryPercent}%`}
) : ( <>
{driverLabel ? (
{driverLabel}
) : null}
{batteryPercent == null ? '--%' : `${batteryPercent}%`}
{showPreview ? (
) : null}
)}
); }