'use client'; import type { CSSProperties, ReactNode } from 'react'; import { Play, RotateCcw } from 'lucide-react'; import type { Slide, PPTImageElement, PPTVideoElement } from '@openmaic/dsl'; import { SlideCanvas } from '@openmaic/renderer'; import { useResolvedSlideMedia, type ResolvedSlideMediaEntry } from './use-resolved-slide'; import { useI18n } from '@/lib/hooks/use-i18n'; import { retryMediaTask } from '@/lib/media/media-orchestrator'; import { mediaResolutionCanRetry } from '@/lib/media/resolve-media-ref'; interface SlideThumbnailProps { /** Slide data */ readonly slide: Slide; /** * Thumbnail width in px. When omitted, the thumbnail fills its parent * (`w-full h-full`) — use auto-size in any container that already constrains * width via CSS (e.g. `aspect-video w-full`). */ readonly size?: number; /** Viewport width base (default 1000px). Kept for call-site API parity with * the legacy `ThumbnailSlide`; the actual fit is driven by `slide.viewportSize`. */ readonly viewportSize?: number; /** Viewport aspect ratio (default 0.5625 i.e. 16:9). Used to size the explicit box. */ readonly viewportRatio: number; /** Whether visible (for lazy loading optimization) */ readonly visible?: boolean; /** Owning scene used to scope a shared-ref retry. */ readonly sceneId?: string; } /** * Read-only thumbnail rendering for a video element. Replaces `@openmaic/renderer`'s * default `