/**
 * zh-CN 国际化文案（ai14）
 *
 * 学生端全部 UI 文案集中在此，按域分区。
 * 错误码 i18n 路由：依据 extensions.code 前缀映射到 errors.{prefix}.{{code}}
 * 前缀：IAM_ / CORE_EDU_ / BFF_STUDENT_ / GW_ / NETWORK_
 */

export const messages = {
  common: {
    loading: "加载中…",
    error: "加载失败",
    empty: "暂无数据",
    retry: "重试",
    cancel: "取消",
    confirm: "确认",
    submit: "提交",
    submitting: "提交中…",
    save: "保存",
    saved: "已保存",
    saving: "保存中…",
    back: "返回",
    more: "加载更多",
    noMore: "没有更多了",
    all: "全部",
    markAllRead: "全部标记已读",
    markRead: "标记已读",
    unread: "未读",
    read: "已读",
    search: "搜索",
    optional: "选填",
    required: "必填",
    expand: "展开",
    collapse: "收起",
    reload: "重新加载",
    backHome: "返回首页",
    degradedMode: "部分数据可能不是最新",
    offlineMode: "离线模式：操作将在联网后同步",
    networkError: "网络错误，请检查网络连接",
    pageError: "页面出现错误",
    pageErrorDesc: "抱歉，页面渲染时出现异常，请尝试重新加载。",
    featureInDevelopment: "功能开发中",
    featureInDevelopmentDesc: "此功能正在建设中，敬请期待。",
  },

  nav: {
    dashboard: "仪表盘",
    myHomework: "我的作业",
    myExams: "我的考试",
    myGrades: "我的成绩",
    myAttendance: "我的考勤",
    learningPath: "学习路径",
    diagnostic: "学情诊断",
    weakness: "薄弱知识点",
    trend: "学习趋势",
    textbooks: "教材",
    notifications: "通知中心",
    aiTutor: "AI 辅学",
  },

  dashboard: {
    title: "学生仪表盘",
    welcome: "欢迎，{name}",
    upcomingHomework: "待完成作业",
    upcomingExams: "即将开始的考试",
    recentGrades: "最近成绩",
    attendanceRate: "出勤率",
    learningStreakDays: "连续学习天数",
    days: "天",
    noUpcomingHomework: "暂无待完成作业",
    noUpcomingExams: "暂无即将开始的考试",
  },

  exams: {
    title: "我的考试",
    statusUpcoming: "未开始",
    statusInProgress: "进行中",
    statusSubmitted: "已提交",
    statusExpired: "已结束",
    start: "开始作答",
    viewResult: "查看成绩",
    takeExam: "进入考试",
    submit: "交卷",
    confirmSubmit: "确认提交试卷？提交后将无法修改。",
    unansweredWarning: "还有 {count} 题未作答",
    submitSuccess: "试卷已提交",
    submitFailed: "提交失败，请重试",
    submitFailedNetwork: "网络异常，答案已保存，稍后将自动重试提交",
    timeRemaining: "剩余时间：{time}",
    timeUp: "时间到，已自动提交",
    alreadySubmitted: "该试卷已提交",
    resultTitle: "考试结果",
    score: "得分",
    maxScore: "满分",
    rank: "排名",
    antiCheat: {
      tooManyTabSwitches: "检测到多次切屏，已记录",
      copyDisabled: "考试期间禁止复制",
      pasteDisabled: "考试期间禁止粘贴",
      fullscreenExit: "已退出全屏",
      multiTabDetected: "检测到多个标签页打开同一考试",
    },
    draftRecovery: {
      title: "检测到未完成的作答",
      description:
        "上次作答已自动保存（已答 {answeredCount} 题，保存于 {lastSavedAt}），是否恢复？",
      restore: "恢复作答",
      discard: "放弃并重新开始",
    },
  },

  homework: {
    title: "我的作业",
    statusPending: "待提交",
    statusSubmitted: "已提交",
    statusGraded: "已批改",
    statusExpired: "已截止",
    statusOverdue: "已逾期",
    subject: "科目",
    dueAt: "截止时间",
    submittedAt: "提交时间",
    submit: "提交作业",
    submitSuccess: "作业已提交",
    submitFailed: "提交失败，请重试",
    question: "第 {index} 题",
    yourAnswer: "你的答案",
    shortAnswerPlaceholder: "请输入你的答案",
    noteLabel: "备注（选填）",
    notePlaceholder: "对老师说的话…",
    attachmentLabel: "附件",
    attachmentPlaceholder: "附件上传功能待 ISSUE-014-05 仲裁",
    attachmentHint: "支持图片 / PDF，最多 5 个，单个不超过 10MB",
    draftSaved: "草稿已自动保存",
    answerRequired: "请填写答案",
    restoreDraftTitle: "检测到未提交的草稿",
    restoreDraftDesc: "是否恢复上次的作答草稿？",
    restore: "恢复草稿",
    discard: "不恢复",
  },

  grades: {
    title: "我的成绩",
    subject: "科目",
    examName: "考试名称",
    score: "得分",
    maxScore: "满分",
    grade: "等级",
    submittedAt: "考试时间",
    rank: "班级排名",
    noGrades: "暂无成绩记录",
  },

  attendance: {
    title: "我的考勤",
    present: "出勤",
    absent: "缺勤",
    late: "迟到",
    earlyLeave: "早退",
    leave: "请假",
    rate: "出勤率",
    thisMonth: "本月",
    noRecords: "暂无考勤记录",
  },

  learning: {
    pathTitle: "学习路径",
    pathSubtitle: "按知识点掌握度推荐的学习顺序",
    mastery: "掌握度",
    recommended: "推荐下一步",
    recommendedReview: "建议复习",
    recommendedPractice: "建议练习",
    recommendedMastered: "已掌握",
    statusLocked: "未解锁",
    statusAvailable: "可学习",
    statusInProgress: "学习中",
    statusCompleted: "已完成",
    nextAction: "推荐动作",
    diagnosticTitle: "学情诊断",
    diagnosticSubtitle: "各科目知识点掌握度雷达图",
    weaknessTitle: "薄弱知识点",
    weaknessSubtitle: "需要加强的知识点与建议",
    topic: "知识点",
    trendTitle: "学习趋势",
    trendSubtitle: "历次考试得分趋势",
    trendUp: "上升",
    trendDown: "下降",
    trendStable: "平稳",
    average: "平均分",
    highest: "最高分",
    lowest: "最低分",
    textbooksTitle: "教材列表",
    textbooksSubtitle: "按科目浏览教材与章节",
    chaptersTitle: "章节目录",
    chaptersSubtitle: "教材章节与课时",
    publisher: "出版社",
    grade: "年级",
    lessons: "{count} 课时",
    progress: "进度",
    noPath: "暂无学习路径数据",
    noWeakness: "暂无薄弱知识点数据，继续保持！",
    noTrend: "暂无学习趋势数据",
    noTextbooks: "暂无教材",
    noChapters: "暂无章节",
    lessonCount: "{count} 节课",
    completedLessons: "已完成 {done}/{total}",
  },

  notifications: {
    title: "通知中心",
    subtitle: "作业、考试、成绩与系统通知",
    markAllRead: "全部标记已读",
    markRead: "标记已读",
    loadMore: "加载更多",
    typeHomework: "作业",
    typeExam: "考试",
    typeGrade: "成绩",
    typeSystem: "系统",
    typeHomeworkDesc: "作业通知",
    typeExamDesc: "考试通知",
    typeGradeDesc: "成绩通知",
    typeSystemDesc: "系统通知",
    noNotifications: "暂无通知",
    connected: "实时连接已建立",
    disconnected: "实时连接已断开，正在重连…",
    unreadCount: "{count} 条未读",
    markAllReadSuccess: "已全部标记为已读",
    markReadSuccess: "已标记为已读",
  },

  "ai-tutor": {
    title: "AI 辅学",
    subtitle: "智能答疑与学习辅导",
    placeholder: "请输入你的问题…",
    send: "发送",
    thinking: "正在思考…",
    you: "我",
    ai: "AI 助手",
    welcome: "你好！我是 AI 学习助手，有什么可以帮你的吗？",
    errorStream: "回答生成失败，请重试",
    clear: "清空对话",
    inDevelopment: "AI 辅学功能开发中",
    inDevelopmentDesc: "AI 辅学功能正在建设中，敬请期待。",
  },

  errors: {
    unknown: "发生未知错误，请稍后重试",
    networkError: "网络连接失败，请检查网络",
    unauthorized: "登录已过期，请重新登录",
    forbidden: "没有权限执行此操作",
    notFound: "请求的资源不存在",
    serverError: "服务器繁忙，请稍后重试",
    iam: {
      IAM_INVALID_CREDENTIALS: "账号或密码错误",
      IAM_TOKEN_EXPIRED: "登录已过期，请重新登录",
      IAM_ACCOUNT_LOCKED: "账号已被锁定，请联系管理员",
    },
    coreEdu: {
      CORE_EDU_EXAM_NOT_FOUND: "考试不存在或已删除",
      CORE_EDU_EXAM_NOT_STARTED: "考试尚未开始",
      CORE_EDU_EXAM_EXPIRED: "考试已结束",
      CORE_EDU_EXAM_ALREADY_SUBMITTED: "该考试已提交，无法重复提交",
      CORE_EDU_HOMEWORK_NOT_FOUND: "作业不存在或已删除",
      CORE_EDU_HOMEWORK_EXPIRED: "作业已截止",
      CORE_EDU_HOMEWORK_ALREADY_SUBMITTED: "该作业已提交",
      CORE_EDU_GRADE_NOT_FOUND: "成绩不存在",
    },
    bffStudent: {
      BFF_STUDENT_UPSTREAM_UNAVAILABLE: "部分服务暂不可用，数据可能不完整",
      BFF_STUDENT_QUERY_FAILED: "查询失败，请稍后重试",
    },
    gateway: {
      GW_RATE_LIMITED: "请求过于频繁，请稍后再试",
      GW_UNAUTHORIZED: "未登录或登录已过期",
      GW_FORBIDDEN: "没有权限",
    },
    network: {
      NETWORK_TIMEOUT: "请求超时，请检查网络后重试",
      NETWORK_OFFLINE: "当前处于离线状态",
    },
  },
} as const;

export type Messages = typeof messages;
