import React from 'react' import { Loader2, ImageIcon, RefreshCw } from 'lucide-react' import { resolveFileUrl } from '../../resolveFileUrl' // ----------------------------------------------------------------------------- // Types // ----------------------------------------------------------------------------- type StudioPreviewPanelProps = { imageUrl?: string | null isGenerating?: boolean narration?: string prompt?: string onRegenerateImage?: () => void className?: string } // ----------------------------------------------------------------------------- // Component // ----------------------------------------------------------------------------- /** * Preview panel for the current scene, styled like Imagine's lightbox. * Shows the scene image with narration overlay and generation status. */ export function StudioPreviewPanel({ imageUrl, isGenerating = false, narration, prompt, onRegenerateImage, className = '', }: StudioPreviewPanelProps) { const hasImage = Boolean(imageUrl) return (
Generating image...
{prompt && ({prompt}
)} > ) : ( <>No image for this scene
{onRegenerateImage && ( )} > )}{narration}