'use client'; /** * Image block — a thumbnail that opens a fullscreen zoom/pan lightbox on * click (Telegram / WhatsApp style). The outer frame (radius / border / * shadow) is owned by the shared `BLOCK_SURFACE` in MessageBlocks; here we * only render the image and the lightbox dialog. */ import { useState } from 'react'; import { Dialog, DialogContent, DialogTitle } from '@djangocfg/ui-core/components'; import { LazyImageViewer } from '../../../../media/ImageViewer/lazy'; import type { ImageBlock } from '../../../types/block'; import type { BlockRendererProps } from './types'; export default function ImageBlockRenderer({ block }: BlockRendererProps) { const [open, setOpen] = useState(false); const alt = block.alt ?? 'image'; return ( <> {alt} {open && ( )} ); }