export type TabId = 'overview' | 'test' | 'training' | 'architecture' | 'settings'

export interface TrOCRStatus {
  status: 'available' | 'not_installed' | 'error'
  model_name?: string
  model_id?: string
  device?: string
  is_loaded?: boolean
  has_lora_adapter?: boolean
  training_examples_count?: number
  error?: string
  install_command?: string
}

export interface OCRResult {
  text: string
  confidence: number
  processing_time_ms: number
  model: string
  has_lora_adapter: boolean
}

export interface TrainingExample {
  image_path: string
  ground_truth: string
  teacher_id: string
  created_at: string
}

export interface MagicSettings {
  autoDetectLines: boolean
  confidenceThreshold: number
  maxImageSize: number
  loraRank: number
  loraAlpha: number
  learningRate: number
  epochs: number
  batchSize: number
  enableCache: boolean
  cacheMaxAge: number
}

export const DEFAULT_SETTINGS: MagicSettings = {
  autoDetectLines: true,
  confidenceThreshold: 0.7,
  maxImageSize: 4096,
  loraRank: 8,
  loraAlpha: 32,
  learningRate: 0.00005,
  epochs: 3,
  batchSize: 4,
  enableCache: true,
  cacheMaxAge: 3600,
}

export const TABS = [
  { id: 'overview' as TabId, label: 'Übersicht', icon: '📊' },
  { id: 'test' as TabId, label: 'OCR Test', icon: '🔍' },
  { id: 'training' as TabId, label: 'Training', icon: '🎯' },
  { id: 'architecture' as TabId, label: 'Architektur', icon: '🏗️' },
  { id: 'settings' as TabId, label: 'Einstellungen', icon: '⚙️' },
]
