'use client' import type { StructureBox, StructureGraphic } from '@/app/(admin)/ai/ocr-kombi/types' interface StructureLayerProps { boxes: StructureBox[] graphics: StructureGraphic[] imgW: number imgH: number show: boolean } /** * Renders structure boxes and graphic elements as a positioned overlay. * Used as a background layer in both simple and overlay reconstruction modes. */ export function StructureLayer({ boxes, graphics, imgW, imgH, show }: StructureLayerProps) { if (!show) return null if (boxes.length === 0 && graphics.length === 0) return null return ( <> {/* Structure boxes */} {boxes.map((box, i) => { const bgColor = box.bg_color_hex || '#6b7280' return (
) })} {/* Graphic elements */} {graphics.map((g, i) => (
{g.shape === 'illustration' ? 'Illust' : 'Bild'}
))} ) }