// TODO: replace with API
export const uploadRecordMock = [
  { name: '季度风险监测报告.docx', time: '2026-04-11 09:20' },
  { name: '海外舆情摘编-第12期.pdf', time: '2026-04-10 16:43' },
  { name: '政策快报-智能风控.txt', time: '2026-04-09 11:08' }
]

/** 文档上传记录列表（含表格字段） */
export const uploadRecordListMock = [
  {
    id: 'r-1',
    name: '季度风险监测报告.pdf',
    uploadTime: '2026-04-11 09:20',
    sizeBytes: 2457600,
    status: '已完成'
  },
  {
    id: 'r-2',
    name: '海外舆情摘编-第12期.pdf',
    uploadTime: '2026-04-10 16:43',
    sizeBytes: 892416,
    status: '翻译中'
  },
  {
    id: 'r-3',
    name: '政策快报-智能风控.pdf',
    uploadTime: '2026-04-09 11:08',
    sizeBytes: 524288,
    status: '已完成'
  },
  {
    id: 'r-4',
    name: '合规审查备忘录.pdf',
    uploadTime: '2026-04-08 14:22',
    sizeBytes: 1310720,
    status: '失败'
  }
]

// TODO: replace with API
export const articleTreeMock = [
  { id: 'all', title: '全部章节' },
  { id: 'sec-1', title: '一、风险概览' },
  { id: 'sec-2', title: '二、重点行业观察' },
  { id: 'sec-3', title: '三、处置建议' }
]

// TODO: replace with API
export const paragraphRowsMock = [
  {
    id: 'p-1',
    sectionId: 'sec-1',
    sourceText:
      'Global liquidity tightened in Q1, increasing refinancing pressure in emerging markets.',
    translatedText: '第一季度全球流动性收紧，增加了新兴市场的再融资压力。'
  },
  {
    id: 'p-2',
    sectionId: 'sec-1',
    sourceText: 'Cross-border capital flow volatility remained high across major regions.',
    translatedText: '主要地区跨境资本流动波动仍处于高位。'
  },
  {
    id: 'p-3',
    sectionId: 'sec-2',
    sourceText:
      'Technology supply chains showed mixed recovery signals with persistent inventory risk.',
    translatedText: '科技供应链出现分化修复信号，但库存风险仍然存在。'
  },
  {
    id: 'p-4',
    sectionId: 'sec-3',
    sourceText:
      'It is recommended to improve early-warning thresholds and optimize contingency drills.',
    translatedText: '建议完善预警阈值设置并优化应急演练机制。'
  }
]

/** 文档对照数据（TODO: 替换为真实接口） */
export function fetchDocumentCompareMock(_fileName, delayMs = 2500) {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve({
        articleTree: articleTreeMock,
        paragraphRows: paragraphRowsMock
      })
    }, delayMs)
  })
}
