import type { TguPlanUi, TguPlatformUi } from "../../model/timelineTypes"; import { formatDuration } from "./editorPresentation"; type EditorToolbarProps = { selectedSpacecraftId?: string; selectedPlan?: TguPlanUi; platforms: TguPlatformUi[]; canUndo: boolean; canRedo: boolean; checking: boolean; conflictCount: number; addedCount: number; dirty: boolean; applying: boolean; canceling: boolean; windowLabel: string; rightMode: "none" | "inspect" | "shoot" | "downlink" | "mapInfo"; onSetRightMode: (mode: "shoot" | "downlink") => void; onUndo: () => void; onRedo: () => void; onCheck: () => void; onApply: () => void; onCancel: () => void; onZoom: (factor: number) => void; onPan: (factor: number) => void; }; export function EditorToolbar({ selectedSpacecraftId, selectedPlan, platforms, canUndo, canRedo, checking, conflictCount, addedCount, dirty, applying, canceling, windowLabel, rightMode, onSetRightMode, onUndo, onRedo, onCheck, onApply, onCancel, onZoom, onPan }: EditorToolbarProps) { const platformLabel = selectedSpacecraftId ? platforms.find((platform) => platform.spacecraftId === selectedSpacecraftId)?.name ?? selectedSpacecraftId : "КА не выбран"; return (