import {
  BadgeCheck,
  Bot,
  CalendarDays,
  Database,
  FileArchive,
  FileImage,
  FileSignature,
  FileText,
  Loader2,
  Presentation,
  ShieldCheck
} from 'lucide-react'

import type { LogEntry, SectionKey, Status, StudentDataItem, ToolItem } from '@renderer/types/app'

export const sectionTitle: Record<SectionKey, string> = {
  tools: '小工具',
  student: '学生管理',
  settings: '设置'
}

export const statusVariant: Record<Status, 'success' | 'secondary' | 'warning' | 'outline'> = {
  可运行: 'success',
  待配置: 'secondary',
  待导入: 'warning',
  待审核: 'outline'
}

export const levelClass = {
  INFO: 'text-sky-400',
  SUCCESS: 'text-emerald-400',
  WARNING: 'text-amber-300',
  ERROR: 'text-red-400'
} as const

export const tools: ToolItem[] = [
  {
    title: '生成图片路径',
    description: '批量扫描幼儿照片目录，生成可用于报告模板的图片路径数据。',
    icon: FileImage,
    status: '待配置'
  },
  {
    title: '生成评语',
    description: '根据幼儿观察记录、关键词和模板要求生成成长评语。',
    icon: Bot,
    status: '可运行'
  },
  {
    title: '生成报告',
    description: '将幼儿资料、图片和评语合成为成长报告 PPT。',
    icon: Presentation,
    status: '可运行'
  },
  {
    title: '格式转换',
    description: '把 PPT、Word 等报告文件批量转换为 PDF 归档文件。',
    icon: FileArchive,
    status: '可运行'
  },
  {
    title: '生肖生成',
    description: '依据出生日期自动生成生肖、年龄和学期信息。',
    icon: CalendarDays,
    status: '待导入'
  },
  {
    title: '园长签名',
    description: '为已审核的成长报告批量追加园长签名或签章。',
    icon: FileSignature,
    status: '待审核'
  }
]

export const studentDataItems: StudentDataItem[] = [
  {
    title: '幼儿基础数据',
    description: '姓名、班级、生日、学号、家长联系方式等核心档案。',
    amount: '128 条记录',
    updatedAt: '今天 09:12'
  },
  {
    title: '报告模板',
    description: 'PPT 模板、封面模板、签名模板和导出规则。',
    amount: '6 个模板',
    updatedAt: '昨天 18:40'
  },
  {
    title: '素材目录',
    description: '幼儿照片、班级活动图片和临时生成文件。',
    amount: '3 个目录',
    updatedAt: '今天 08:30'
  },
  {
    title: '备份与恢复',
    description: '导出当前配置与数据快照，支持后续恢复。',
    amount: '今日未备份',
    updatedAt: '2026-06-23'
  }
]

export const logs: LogEntry[] = [
  { time: '09:29:17', level: 'SUCCESS', message: '学生：刘逸喻，评语生成完毕' },
  { time: '09:29:18', level: 'INFO', message: '正在生成第 7 份成长评语' },
  { time: '09:29:18', level: 'ERROR', message: '生成评语失败：response choices 为空' },
  { time: '09:29:19', level: 'INFO', message: '正在生成第 8 份成长评语' },
  { time: '09:29:20', level: 'WARNING', message: '任务正在停止中，正在中断' }
]

export const metrics = [
  { title: '幼儿档案', value: '128', description: '已导入基础数据', icon: Database },
  { title: '报告任务', value: '20', description: '本轮待生成', icon: FileText },
  { title: '完成率', value: '72%', description: '今日批处理进度', icon: BadgeCheck },
  { title: '异常', value: '2', description: '需要人工确认', icon: ShieldCheck }
]

export const recentTasks = [
  { icon: Bot, title: '生成评语', value: '8/20' },
  { icon: Presentation, title: '生成报告', value: '3/20' },
  { icon: Loader2, title: '格式转换', value: '排队中' }
]
