import { CheckCircle, ClosedCaptioning, Eye, EyeSlash, ListBullets, PersonSimpleRun, Trash, Waveform, } from "@phosphor-icons/react"; import { formatTime, getSegmentStartTime } from "../lib/timeline.js"; import { HistoryPanel, MyVoicesPanel, VoiceSynthesisPanel } from "./panels.jsx"; function CaptionContextPanel({ t, captionSegments, selectedCaptionSegment, selectedSegmentId, setSelectedSegmentId, currentSegmentIndex, captionTargetDuration, updateCaptionSegmentText, toggleCaptionSegmentHidden, deleteCaptionSegment, seekTo, sourceAudioBlob, generateCaptionsFromSourceAudio, isGeneratingCaptions, automaticCaptionProgress, }) { const selectedIndex = Math.max( 0, captionSegments.findIndex((segment) => segment.id === selectedCaptionSegment?.id), ); const selectedStart = captionSegments.length ? getSegmentStartTime(captionSegments, selectedIndex, captionTargetDuration) : 0; return (
{selectedCaptionSegment ? (