import { ArrowPathIcon, ForwardIcon, PauseIcon, PlayIcon } from '@heroicons/react/24/solid'; import type { Run } from '../services/backtestApiV2'; interface RunControlsCompactProps { run: Run; onPause: () => void; onResume: () => void; onRerun: (speed: number | null) => void; onNext?: () => void; onSpeedChange: (speed: number | null) => void; } export function RunControlsCompact({ run, onPause, onResume, onRerun, onNext, }: RunControlsCompactProps) { const isRunning = run.status === 'running'; const isPaused = run.status === 'paused'; const _isCompleted = run.status === 'completed' || run.status === 'failed' || run.status === 'cancelled'; return (
{/* Progress */}
Progress:
{run.progress.toFixed(0)}%
{/* Control Buttons */}
{isRunning ? ( ) : isPaused ? ( ) : null} {onNext && ( )}
{/* Status Indicator */} {run.status !== 'running' && run.status !== 'paused' && ( <>
{run.status.charAt(0).toUpperCase() + run.status.slice(1)} )}
); }