export interface LlmChange {
  row_index: number
  field: 'english' | 'german' | 'example'
  old: string
  new: string
}

export interface StepLlmReviewProps {
  sessionId: string | null
  onNext: () => void
}

export interface ReviewMeta {
  total_entries: number
  to_review: number
  skipped: number
  model: string
  skipped_indices?: number[]
}

export interface StreamProgress {
  current: number
  total: number
}

export const FIELD_LABELS: Record<string, string> = {
  english: 'EN',
  german: 'DE',
  example: 'Beispiel',
  source_page: 'Seite',
  marker: 'Marker',
  text: 'Text',
}

/** Map column type to WordEntry field name */
export const COL_TYPE_TO_FIELD: Record<string, string> = {
  column_en: 'english',
  column_de: 'german',
  column_example: 'example',
  page_ref: 'source_page',
  column_marker: 'marker',
  column_text: 'text',
}

/** Column type to color class */
export const COL_TYPE_COLOR: Record<string, string> = {
  column_en: 'text-blue-600 dark:text-blue-400',
  column_de: 'text-green-600 dark:text-green-400',
  column_example: 'text-orange-600 dark:text-orange-400',
  page_ref: 'text-cyan-600 dark:text-cyan-400',
  column_marker: 'text-gray-500 dark:text-gray-400',
  column_text: 'text-gray-700 dark:text-gray-300',
}

export type RowStatus = 'pending' | 'active' | 'reviewed' | 'corrected' | 'skipped'

export const KLAUSUR_API = '/klausur-api'
