export const metricBlueprints = [
  {
    key: 'reimbursementAmount',
    label: '本期报销金额',
    accent: 'var(--theme-primary)',
    icon: 'mdi mdi-cash-multiple',
    trend: 'up',
    change: '8.4%',
    delta: '较上一周期 +¥42.8K'
  },
  {
    key: 'reimbursementCount',
    label: '报销单数',
    unit: '单',
    accent: 'var(--chart-blue)',
    icon: 'mdi mdi-file-document-outline',
    trend: 'up',
    change: '6.1%',
    delta: '较上一周期 +23 单'
  },
  {
    key: 'pendingPaymentAmount',
    label: '待付款金额',
    accent: 'var(--chart-purple)',
    icon: 'mdi mdi-bank-transfer-out',
    trend: 'down',
    change: '4.7%',
    delta: '较上一周期 -¥18.3K'
  },
  {
    key: 'avgClaimAmount',
    label: '单均金额',
    accent: 'var(--chart-amber)',
    icon: 'mdi mdi-calculator-variant-outline',
    trend: 'up',
    change: '2.8%',
    delta: '较上一周期 +¥180'
  },
  {
    key: 'budgetUsageRate',
    label: '预算使用率',
    unit: '%',
    accent: 'var(--success)',
    icon: 'mdi mdi-chart-arc',
    trend: 'up',
    change: '3.2%',
    delta: '预算池汇总'
  },
  {
    key: 'paymentClearanceRate',
    label: '付款完成率',
    unit: '%',
    accent: 'var(--success)',
    icon: 'mdi mdi-check-circle-outline',
    trend: 'up',
    change: '5.5%',
    delta: '已付款 / 有效单据'
  }
]

export const systemMetricBlueprints = [
  {
    key: 'toolCalls',
    label: '工具调用次数',
    unit: '次',
    accent: 'var(--theme-primary)',
    icon: 'mdi mdi-tools',
    trend: 'up',
    change: '18.6%',
    delta: '较昨日 +286 次'
  },
  {
    key: 'modelTokens',
    label: '大模型 Token',
    unit: 'tokens',
    accent: 'var(--chart-blue)',
    icon: 'mdi mdi-chip',
    trend: 'up',
    change: '11.2%',
    delta: '较昨日 +43.2K'
  },
  {
    key: 'onlineUsers',
    label: '当前在线人数',
    unit: '人',
    accent: 'var(--chart-purple)',
    icon: 'mdi mdi-account-multiple-outline',
    trend: 'up',
    change: '9.4%',
    delta: '峰值 168 人'
  },
  {
    key: 'avgOnlineMinutes',
    label: '平均在线时长',
    unit: '分钟',
    accent: 'var(--chart-amber)',
    icon: 'mdi mdi-timer-outline',
    trend: 'down',
    change: '4.8%',
    delta: '较昨日 -1.9 分钟'
  },
  {
    key: 'executionSuccessRate',
    label: '执行成功率',
    unit: '%',
    accent: 'var(--success)',
    icon: 'mdi mdi-check-decagram-outline',
    trend: 'up',
    change: '2.1%',
    delta: '错误率 3.6%'
  },
  {
    key: 'positiveFeedback',
    label: '好评 / 差评',
    accent: 'var(--danger)',
    icon: 'mdi mdi-thumb-up-outline',
    trend: 'up',
    change: '5.7%',
    delta: '差评 31 次'
  }
]

export const trendRanges = ['近12天', '近7天', '近30天']

export const trendSeries = {
  '近12天': {
    labels: ['07-01', '07-02', '07-03', '07-04', '07-05', '07-06', '07-07', '07-08', '07-09', '07-10', '07-12'],
    claimCount: [14, 11, 18, 20, 16, 7, 7, 6, 19, 20, 22],
    claimAmount: [38600, 31200, 49600, 55200, 44800, 19600, 20800, 18200, 56300, 60400, 68100],
    applications: [14, 11, 18, 20, 16, 7, 7, 6, 19, 20, 22],
    approved: [11, 9, 13, 13, 11, 6, 6, 5, 15, 15, 17],
    avgHours: [10, 8, 9, 7, 7, 6.8, 6, 6.5, 7, 8, 7.5]
  },
  '近7天': {
    labels: ['04-23', '04-24', '04-25', '04-26', '04-27', '04-28', '04-29'],
    claimCount: [7, 7, 11, 12, 13, 14, 13],
    claimAmount: [22100, 20600, 33800, 36200, 41600, 43800, 39700],
    applications: [7, 7, 11, 12, 13, 14, 13],
    approved: [6, 5, 9, 10, 12, 12, 11],
    avgHours: [6.9, 6.5, 6.8, 7.1, 7.4, 7.0, 6.8]
  },
  '近30天': {
    labels: ['03-31', '04-03', '04-06', '04-09', '04-12', '04-15', '04-18', '04-21', '04-24', '04-27'],
    claimCount: [8, 9, 10, 11, 12, 11, 13, 13, 12, 14],
    claimAmount: [24600, 27900, 29200, 35100, 38200, 33600, 40100, 42800, 36500, 44700],
    applications: [8, 9, 10, 11, 12, 11, 13, 13, 12, 14],
    approved: [7, 8, 8, 10, 10, 9, 10, 11, 10, 12],
    avgHours: [9.2, 8.8, 8.4, 8.0, 7.7, 7.4, 7.2, 6.9, 6.8, 6.7]
  }
}

export const spendByCategory = [
  { name: '机票', value: 182000, color: 'var(--theme-primary)' },
  { name: '酒店', value: 146000, color: 'var(--chart-blue)' },
  { name: '火车/用车', value: 78600, color: 'var(--chart-amber)' },
  { name: '餐补及杂费', value: 55000, color: 'var(--chart-purple)' }
]

export const exceptionMix = [
  { name: '已付款', value: 68, color: 'var(--success)' },
  { name: '待付款', value: 18, color: 'var(--chart-amber)' },
  { name: '审批中', value: 12, color: 'var(--theme-primary)' },
  { name: '已入账', value: 9, color: 'var(--chart-blue)' }
]

export const departmentRangeOptions = ['本月', '本季度', '本年', '全部']

export const bottlenecks = [
  {
    name: '预算超支',
    role: '预算控制',
    duration: '3 个池',
    status: '¥42.6K',
    tone: 'danger',
    avatar: '超'
  },
  {
    name: '待付款',
    role: '资金计划',
    duration: '¥86.3K',
    status: '18 单',
    tone: 'warning',
    avatar: '付'
  },
  {
    name: '高额单据',
    role: '费用集中度',
    duration: '¥18.6K',
    status: '本期最高',
    tone: 'warning',
    avatar: '高'
  }
]

export const budgetSummary = {
  ratio: 76,
  total: '¥2,800,000',
  used: '¥2,128,000',
  left: '¥672,000'
}

export const systemDashboardTotals = {
  toolCalls: 1842,
  modelTokens: 428600,
  onlineUsers: 126,
  avgOnlineMinutes: 38.6,
  executionSuccessRate: 96.4,
  positiveFeedback: 215,
  negativeFeedback: 31
}

export const systemTrendSeries = {
  labels: ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00'],
  toolCalls: [148, 196, 252, 184, 216, 318, 296, 232],
  tokens: [36200, 48600, 64200, 41800, 52300, 73600, 68900, 43000],
  onlineUsers: [76, 94, 118, 86, 104, 143, 137, 126],
  onlineMinutes: [31.2, 35.4, 39.8, 34.1, 36.6, 42.5, 41.7, 38.6]
}

export const systemAgentDailyRatio = {
  labels: ['05-23', '05-24', '05-25', '05-26', '05-27', '05-28', '05-29'],
  agents: [
    { key: 'preAudit', name: '报销预审', color: 'var(--theme-primary)' },
    { key: 'policyQa', name: '政策问答', color: 'var(--chart-blue)' },
    { key: 'invoiceOcr', name: '票据识别', color: 'var(--chart-amber)' },
    { key: 'ruleAudit', name: '规则审核', color: 'var(--chart-purple)' },
    { key: 'employeeLookup', name: '员工查询', color: 'var(--success)' },
    { key: 'diagnosis', name: '异常诊断', color: 'var(--danger)' }
  ],
  series: {
    preAudit: [30, 32, 35, 31, 34, 37, 33],
    policyQa: [24, 22, 21, 25, 22, 20, 23],
    invoiceOcr: [18, 19, 17, 18, 16, 15, 17],
    ruleAudit: [16, 15, 15, 14, 16, 15, 15],
    employeeLookup: [8, 8, 8, 8, 8, 7, 8],
    diagnosis: [4, 4, 4, 4, 4, 6, 4]
  }
}

export const systemLoginWave = {
  labels: ['08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00'],
  loginUsers: [18, 56, 94, 121, 84, 73, 116, 158, 146, 126, 92, 58, 34],
  interactions: [36, 118, 214, 286, 174, 156, 268, 348, 326, 278, 188, 102, 54]
}

export const systemTokenDailyWave = {
  labels: ['05-23', '05-24', '05-25', '05-26', '05-27', '05-28', '05-29'],
  inputTokens: [38200, 41600, 48600, 46200, 53800, 58400, 52600],
  outputTokens: [18600, 22400, 25800, 23600, 28600, 31800, 29400],
  totalTokens: [56800, 64000, 74400, 69800, 82400, 90200, 82000]
}

export const systemUsageDurationSummary = {
  average: '38.6 分钟',
  median: '34.2 分钟',
  peak: '58.4 分钟',
  trend: '+6.8%',
  rows: [
    { label: '0-10 分钟', value: 28, color: 'var(--chart-blue)' },
    { label: '10-30 分钟', value: 64, color: 'var(--theme-primary)' },
    { label: '30-60 分钟', value: 82, color: 'var(--chart-purple)' },
    { label: '60 分钟以上', value: 31, color: 'var(--chart-amber)' }
  ]
}

export const systemUserTokenUsage = [
  { name: '陈雨晴', role: '财务经理', tokens: 96800, color: 'var(--theme-primary)' },
  { name: '顾成宇', role: '研发负责人', tokens: 82500, color: 'var(--chart-blue)' },
  { name: '沈佳宁', role: '销售运营', tokens: 68400, color: 'var(--chart-amber)' },
  { name: '赵明轩', role: '行政专员', tokens: 53800, color: 'var(--chart-purple)' },
  { name: '李思远', role: '部门主管', tokens: 42600, color: 'var(--success)' },
  { name: '王若彤', role: '费用审核', tokens: 31500, color: 'var(--danger)' }
]

export const systemAccuracyComparison = {
  categories: ['报销预审', '政策问答', '票据识别', '规则审核', '员工查询', '异常诊断'],
  correct: [516, 410, 313, 275, 172, 102],
  wrong: [12, 6, 15, 11, 2, 8]
}

export const systemLoadHeatmap = {
  hours: ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00'],
  tools: ['报销预审', '政策问答', '票据识别', '规则审核', '员工查询', '异常诊断'],
  values: [
    [0, 0, 42], [1, 0, 58], [2, 0, 74], [3, 0, 52], [4, 0, 64], [5, 0, 88], [6, 0, 82], [7, 0, 68],
    [0, 1, 36], [1, 1, 44], [2, 1, 61], [3, 1, 40], [4, 1, 46], [5, 1, 69], [6, 1, 64], [7, 1, 56],
    [0, 2, 28], [1, 2, 39], [2, 2, 52], [3, 2, 33], [4, 2, 41], [5, 2, 67], [6, 2, 58], [7, 2, 46],
    [0, 3, 24], [1, 3, 32], [2, 3, 45], [3, 3, 30], [4, 3, 36], [5, 3, 55], [6, 3, 52], [7, 3, 38],
    [0, 4, 12], [1, 4, 20], [2, 4, 26], [3, 4, 18], [4, 4, 22], [5, 4, 34], [6, 4, 29], [7, 4, 24],
    [0, 5, 6], [1, 5, 12], [2, 5, 18], [3, 5, 11], [4, 5, 13], [5, 5, 22], [6, 5, 19], [7, 5, 15]
  ]
}

export const systemToolCallMix = [
  { name: '报销预审', value: 528, color: 'var(--theme-primary)' },
  { name: '政策问答', value: 416, color: 'var(--chart-blue)' },
  { name: '票据识别', value: 328, color: 'var(--chart-amber)' },
  { name: '规则审核', value: 286, color: 'var(--chart-purple)' },
  { name: '员工查询', value: 174, color: 'var(--success)' },
  { name: '异常诊断', value: 110, color: 'var(--danger)' }
]

export const systemExecutionMix = [
  { name: '成功', value: 1776, color: 'var(--success)' },
  { name: '业务拦截', value: 38, color: 'var(--chart-amber)' },
  { name: '超时', value: 16, color: 'var(--warning)' },
  { name: '错误', value: 12, color: 'var(--danger)' }
]

export const systemToolRankings = [
  { name: '费用规则匹配', value: 486, color: 'var(--theme-primary)' },
  { name: '发票结构化解析', value: 392, color: 'var(--chart-blue)' },
  { name: '差旅标准查询', value: 318, color: 'var(--chart-amber)' },
  { name: '审批流推荐', value: 241, color: 'var(--chart-purple)' },
  { name: '员工组织查询', value: 176, color: 'var(--success)' }
]

export const systemModelUsage = [
  { name: '智能填单与预审', tokens: 146800, share: 34, color: 'var(--theme-primary)' },
  { name: '政策知识问答', tokens: 118400, share: 28, color: 'var(--chart-blue)' },
  { name: '票据 OCR 解释', tokens: 86300, share: 20, color: 'var(--chart-amber)' },
  { name: '异常原因归纳', tokens: 77100, share: 18, color: 'var(--chart-purple)' }
]

export const systemFeedbackSummary = [
  { label: '好评次数', value: 215, tone: 'success', icon: 'mdi mdi-thumb-up-outline' },
  { label: '差评次数', value: 31, tone: 'danger', icon: 'mdi mdi-thumb-down-outline' },
  { label: '反馈率', value: '13.4%', tone: 'info', icon: 'mdi mdi-message-processing-outline' }
]

export const systemToolDetailRows = [
  { name: '报销预审', calls: 528, successRate: 97.8, avgLatency: '1.8s', tokens: 146800, color: 'var(--theme-primary)' },
  { name: '政策问答', calls: 416, successRate: 98.6, avgLatency: '1.2s', tokens: 118400, color: 'var(--chart-blue)' },
  { name: '票据识别', calls: 328, successRate: 95.4, avgLatency: '2.6s', tokens: 86300, color: 'var(--chart-amber)' },
  { name: '规则审核', calls: 286, successRate: 96.1, avgLatency: '1.5s', tokens: 77100, color: 'var(--chart-purple)' },
  { name: '员工查询', calls: 174, successRate: 99.2, avgLatency: '0.8s', tokens: 18200, color: 'var(--success)' },
  { name: '异常诊断', calls: 110, successRate: 92.7, avgLatency: '2.9s', tokens: 31800, color: 'var(--danger)' }
]
