import { useTranslation } from 'react-i18next'; interface Props { currentTime: number; historyMinutes: number; onHistoryChange: (minutes: number) => void; aircraftCount: number; shipCount: number; satelliteCount: number; timeZone: 'KST' | 'UTC'; onTimeZoneChange: (tz: 'KST' | 'UTC') => void; } const HISTORY_PRESETS = [ { label: '1H', minutes: 60 }, { label: '2H', minutes: 120 }, { label: '3H', minutes: 180 }, { label: '6H', minutes: 360 }, ]; function formatTime(epoch: number, tz: 'KST' | 'UTC'): string { const d = new Date(epoch); const pad = (n: number) => String(n).padStart(2, '0'); if (tz === 'UTC') { return `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())} ${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}`; } return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`; } export function LiveControls({ currentTime, historyMinutes, onHistoryChange, timeZone, onTimeZoneChange, }: Props) { const { t } = useTranslation(); return (