import type { LucideIcon } from 'lucide-react'

export type SectionKey = 'tools' | 'student' | 'settings'
export type Status = '可运行' | '待配置' | '待导入' | '待审核'
export type LogLevel = 'INFO' | 'SUCCESS' | 'WARNING' | 'ERROR'
export type SettingKey = 'model'

export type MenuItem = {
  id: string
  title: string
  path?: string
  icon?: LucideIcon
  children?: MenuItem[]
}

export type ToolItem = {
  title: string
  description: string
  icon: LucideIcon
  status: Status
}

export type StudentDataItem = {
  title: string
  description: string
  amount: string
  updatedAt: string
}

export type ChildProfile = {
  id: string
  classId: string
  className: string
  name: string
  englishName: string
  gender: string
  birthday: string
  zodiac: string
  friends: string[]
  hobbies: string[]
  favoriteGames: string[]
  favoriteFoods: string[]
  traits: string
  comment: string
  commentGeneratedAt: string
  importedAt: string
}

export type ClassType = 'cheap' | 'noble'

export type ClassProfile = {
  id: string
  name: string
  type: ClassType
  familyPhoto?: string
}

export type TemplateType = 'portrait' | 'landscape'
export type TemplateSemester = 'first' | 'second'

export type TemplatePlaceholder = {
  name: string
  kind: 'text' | 'image'
}

export type TemplateFieldMapping = Record<string, string>

export type TemplateItem = {
  id: string
  name: string
  grade: string
  semester: TemplateSemester
  type: TemplateType
  originalFileName: string
  filePath: string
  fileExtension: string
  placeholders: TemplatePlaceholder[]
  fieldMappings: TemplateFieldMapping
  createdAt: string
  updatedAt: string
}

export type ReportFormat = 'word' | 'ppt' | 'pdf' | 'excel'

export type ReportItem = {
  id: string
  title: string
  classId: string
  className: string
  studentId: string
  studentName: string
  format: ReportFormat
  originalFileName: string
  filePath: string
  fileExtension: string
  templateId: string
  createdAt: string
  updatedAt: string
}

export type LogEntry = {
  time: string
  level: LogLevel
  message: string
}

export type ModelConfig = {
  provider: string
  baseUrl: string
  apiKey: string
  model: string
  temperature: string
  maxTokens: string
  systemPrompt: string
}
