'use client' import type { LlmChange, ReviewMeta } from './llm-review-types' import { FIELD_LABELS } from './llm-review-types' interface LlmReviewCorrectionsProps { changes: LlmChange[] accepted: Set meta: ReviewMeta | null totalDuration: number applying: boolean onToggleChange: (index: number) => void onToggleAll: () => void onApply: () => void onNext: () => void } export function LlmReviewCorrections({ changes, accepted, meta, totalDuration, applying, onToggleChange, onToggleAll, onApply, onNext, }: LlmReviewCorrectionsProps) { return (
{/* Summary */}
{changes.length === 0 ? ( Keine Korrekturen noetig — alle Eintraege sind korrekt. ) : ( {changes.length} Korrektur{changes.length !== 1 ? 'en' : ''} gefunden ·{' '} {accepted.size} ausgewaehlt ·{' '} {meta?.skipped || 0} uebersprungen (Lautschrift) ·{' '} {totalDuration}ms )}
{/* Corrections detail list (if any) */} {changes.length > 0 && (
Korrekturvorschlaege ({accepted.size}/{changes.length} ausgewaehlt)
{changes.map((change, idx) => ( ))}
Zeile Feld Vorher Nachher
onToggleChange(idx)} className="rounded border-gray-300 dark:border-gray-600" /> R{change.row_index} {FIELD_LABELS[change.field] || change.field} {change.old} {change.new}
)} {/* Actions */}

{changes.length > 0 ? `${accepted.size} von ${changes.length} ausgewaehlt` : ''}

{changes.length > 0 && ( )} {changes.length > 0 ? ( ) : ( )}
) }