'use client' /** * Labeling tab: image viewer, OCR text, correction input, and queue preview. */ import { API_BASE } from '../constants' import type { OCRItem } from '../types' interface LabelingTabProps { queue: OCRItem[] currentItem: OCRItem | null currentIndex: number correctedText: string setCorrectedText: (text: string) => void goToNext: () => void goToPrev: () => void selectQueueItem: (idx: number) => void confirmItem: () => void correctItem: () => void skipItem: () => void } export function LabelingTab({ queue, currentItem, currentIndex, correctedText, setCorrectedText, goToNext, goToPrev, selectQueueItem, confirmItem, correctItem, skipItem, }: LabelingTabProps) { return (
{/* Left: Image Viewer */}

Bild

{currentIndex + 1} / {queue.length}
{currentItem ? (
OCR Bild { const target = e.target as HTMLImageElement target.style.display = 'none' }} />
) : (

Keine Bilder in der Warteschlange

)}
{/* Right: OCR Text & Actions */}
{/* OCR Result */}

OCR-Ergebnis

{currentItem?.ocr_confidence && ( 0.8 ? 'bg-green-100 text-green-800' : currentItem.ocr_confidence > 0.5 ? 'bg-yellow-100 text-yellow-800' : 'bg-red-100 text-red-800' }`}> {Math.round(currentItem.ocr_confidence * 100)}% Konfidenz )}
{currentItem?.ocr_text || Kein OCR-Text}
{/* Correction Input */}

Korrektur