import React from "react"; import { useTVModeStore } from "../../stores/tvModeStore"; export const TVModeControls = ({ visible, isPlaying, currentIndex, totalScenes, isPrefetching, isWaitingForNextImage = false, onTogglePlay, onPrev, onNext, onExit, onGoToScene, onShowSettings, ttsEnabled = false, ttsSupported = false, isSpeaking = false, onToggleTTS, }) => { const { storyTitle } = useTVModeStore(); const progress = totalScenes > 0 ? ((currentIndex + 1) / totalScenes) * 100 : 0; const handleProgressClick = (e) => { const rect = e.currentTarget.getBoundingClientRect(); const clickX = e.clientX - rect.left; const percentage = clickX / rect.width; const sceneIndex = Math.floor(percentage * totalScenes); onGoToScene(Math.min(Math.max(sceneIndex, 0), totalScenes - 1)); }; return (