'use client' import type { ImageStyle } from '@/app/(admin)/ai/ocr-kombi/types' import { IMAGE_STYLES as STYLES } from '@/app/(admin)/ai/ocr-kombi/types' import type { ImageRegionWithState } from './ground-truth-types' interface ImageRegionsPanelProps { imageRegions: ImageRegionWithState[] onUpdateRegion: (index: number, update: Partial) => void onGenerateImage: (index: number) => void onRemoveRegion: (index: number) => void } export function ImageRegionsPanel({ imageRegions, onUpdateRegion, onGenerateImage, onRemoveRegion, }: ImageRegionsPanelProps) { if (imageRegions.length === 0) return null return (

Bildbereiche ({imageRegions.length} gefunden)

{imageRegions.map((region, i) => (
{/* Preview thumbnail */}
{region.image_b64 ? ( ) : (
{Math.round(region.bbox_pct.w)}x{Math.round(region.bbox_pct.h)}%
)}
{/* Prompt + controls */}
Bereich {i + 1}: onUpdateRegion(i, { prompt: e.target.value })} placeholder="Beschreibung / Prompt..." className="flex-1 text-sm px-2 py-1 border rounded dark:border-gray-600 dark:bg-gray-700 dark:text-white" />
{region.description && region.description !== region.prompt && (

{region.description}

)}
))}
) }