"use client"; import type { CSSProperties } from "react"; import type { ReplayPreviewDialog, ReplayPreviewImage, ReplayPreviewToast, } from "@/uhm/lib/replay/useReplayPreview"; type Props = { isPreviewMode: boolean; isPlaying: boolean; title: string; descriptions: string; subtitle: string | null; dialog: ReplayPreviewDialog | null; image: ReplayPreviewImage | null; toasts: ReplayPreviewToast[]; sidebarOpen: boolean; playbackSpeed: number; activeStepLabel: string | null; activeStepNumber: number | null; totalSteps: number; onPlayPreview: () => void; onStopPreview: () => void; onResetPreview: () => void; onExitPreview: () => void; }; export default function ReplayPreviewOverlay({ isPreviewMode, isPlaying, title, descriptions, subtitle, dialog, image, toasts, sidebarOpen, playbackSpeed, activeStepLabel, activeStepNumber, totalSteps, onPlayPreview, onStopPreview, onResetPreview, onExitPreview, }: Props) { const hasNarrativeCard = title.trim().length > 0 || descriptions.trim().length > 0; const hasWikiPreview = sidebarOpen; const shouldRender = isPreviewMode || isPlaying || hasNarrativeCard || Boolean(subtitle) || Boolean(dialog) || Boolean(image) || Boolean(toasts.length); if (!shouldRender) { return null; } return (