import type { WrongQuestion } from '../types'

export function isWrongQuestionProcessing(wq: WrongQuestion): boolean {
  if (wq.error_message) return false
  if (wq.status === 'pending') return true
  if (wq.status === 'ocr_done' && !wq.question_text) return true
  return false
}

export function processingHint(wq: WrongQuestion): string {
  if (wq.status === 'pending') {
    return '正在识别文字（约 10–30 秒）…'
  }
  if (wq.status === 'ocr_done') {
    return '正在标注错题并生成解题思路（约 30–90 秒）…'
  }
  return '正在识别、标注并生成解题思路…'
}
