import type { FC } from 'react' import type { OCRResult, EditorialInfo } from '../lib/api.ts' import { STATUS_LABELS, STATUS_VARIANTS } from '../lib/editorial.ts' import { RetroBadge } from './retro' interface Props { ocr: OCRResult | null editorial: EditorialInfo visible: boolean } const TranscriptionPanel: FC = ({ ocr, editorial, visible }) => { if (!visible) return null return (
Transcription diplomatique {STATUS_LABELS[editorial.status]}
{ocr ? (
{ocr.diplomatic_text ? (

{ocr.diplomatic_text}

) : (

Texte vide.

)} {ocr.confidence > 0 && (
Confiance : {(ocr.confidence * 100).toFixed(0)}% — Langue : {ocr.language}
)}
) : (

Transcription non disponible.

)}
) } export default TranscriptionPanel