import React from 'react'; import { Loader2, ImageIcon, RefreshCw } from 'lucide-react'; import { resolveFileUrl } from '../../resolveFileUrl'; // ----------------------------------------------------------------------------- // 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 = '', }) { const hasImage = Boolean(imageUrl); return (
{/* Background gradient */}
{/* Main content area */}
{hasImage ? (
{/* Image container with subtle shadow */}
Scene preview {/* Regenerate overlay on hover */} {onRegenerateImage && (
)}
{/* Generating overlay */} {isGenerating && (
Generating image...
)}
) : ( /* Empty state when no image */
{isGenerating ? (<>

Generating image...

{prompt && (

{prompt}

)} ) : (<>

No image for this scene

{onRegenerateImage && ()} )}
)}
{/* Narration subtitle overlay */} {narration && (

{narration}

)}
); } export default StudioPreviewPanel;