import { Dialog, DialogContent, DialogTitle } from './ui/dialog' import { translate, type AppLocale } from '../lib/i18n' import type { ImageLightboxTarget } from '../utils/imageLightboxTarget' type ImageLightboxProps = { image: ImageLightboxTarget | null locale?: AppLocale onClose: () => void } export function ImageLightbox({ image, locale = 'en', onClose }: ImageLightboxProps) { const title = translate(locale, 'editor.imageLightbox.title') const open = image !== null return ( { if (!nextOpen) onClose() }}> {title} {image && ( {image.alt )} ) }