import type { RouteRecordStringComponent } from '@vben/types';

/**
 * 该文件放非后台返回的路由 比如个人中心 等需要跳转显示的页面
 */
const localRoutes: RouteRecordStringComponent[] = [
  {
    component: '/tool/gen/edit-gen/index',
    meta: {
      activePath: '/tool/gen',
      icon: 'tabler:code',
      title: '生成配置',
      hideInMenu: true,
    },
    name: 'GenConfig',
    path: '/tool/gen/edit-gen/:tableId',
  },
  {
    component: '/system/role-assign/index',
    meta: {
      activePath: '/system/role',
      icon: 'eos-icons:role-binding-outlined',
      title: '分配角色',
      hideInMenu: true,
    },
    name: 'RoleAssign',
    path: '/system/role-assign/:roleId',
  },
  {
    component: '/examManage/questionBank/cpn/questionEdit/index',
    meta: {
      activePath: '/examManage/questionBank',
      icon: 'carbon:edit',
      title: '试题编辑',
      hideInMenu: true,
    },
    name: 'QuestionEdit',
    path: '/examManage/questionBank/questionEdit/:id?',
  },
  {
    component: '/examManage/paperManage/cpn/paper/Edit.vue',
    meta: {
      activePath: '/examManage/paperManage/examPaper',
      icon: 'carbon:edit',
      title: '试卷编辑',
      hideInMenu: true,
    },
    name: 'PaperEdit',
    path: '/examManage/paperManage/edit/:id?',
  },
  // {
  //   component: '/examManage/examPaper/cpn/examPreview',
  //   meta: {
  //     activePath: '/examManage/examPaper',
  //     icon: 'carbon:view',
  //     title: '试卷预览',
  //     hideInMenu: true,
  //   },
  //   name: 'ExamPreview',
  //   path: '/examManage/examPaper/examPreview/:id',
  // },
  {
    component: '/monitor/job/job-log/index',
    meta: {
      activePath: '/monitor/job',
      icon: 'carbon:data-base',
      title: '调度日志',
      hideInMenu: true,
    },
    name: 'JobLog',
    path: '/monitor/job-log',
  },
  {
    component: '/system/user/user-center/index',
    meta: {
      icon: 'la:user-cog',
      title: '个人中心',
      hideInMenu: true,
    },
    name: 'UserCenter',
    path: '/user/center',
  },
  {
    component: '/oilstation/base/create/index',
    meta: {
      activePath: '/oilstation/base',
      icon: 'carbon:data-base',
      title: '添加油站信息',
      hideInMenu: true,
    },
    name: 'OilstationBaseCreate',
    path: '/oilstation/base/create',
  },
  {
    component: '/oilstation/connect/process/index',
    meta: {
      activePath: '/oilstation/connect',
      icon: 'carbon:data-base',
      title: '站长交接详情',
      hideInMenu: true,
    },
    name: 'ConnectProcess',
    path: '/oilstation/connect/process/:id',
  },
  {
    component: '/knowledge/detail/index',
    meta: {
      activePath: '/knowledge/detail',
      icon: 'carbon:data-base',
      title: '知识库详情',
      hideInMenu: true,
    },
    name: 'KnowledgeDetail',
    path: '/knowledge/detail/:classId/:classname/:classicon',
  },
  {
    component: '/knowledge/edit/index',
    meta: {
      activePath: '/knowledge/edit',
      icon: 'carbon:data-base',
      title: '知识库编辑',
      hideInMenu: true,
    },
    name: 'KnowledgeDetailEdit',
    path: '/knowledge/detail/edit/:classId/:ChapterId',
  },
  {
    component: '/system/dict/dict-data/index',
    meta: {
      icon: 'carbon:data-base',
      title: '字典数据',
      hideInMenu: true,
    },
    name: 'DictData',
    path: '/system/dict-data/:dictId',
  },
  {
    component: '/schedule/detail/index',
    meta: {
      icon: 'carbon:data-base',
      title: '任务详情',
      hideInMenu: true,
    },
    name: 'ScheduleDetail',
    path: '/schedule/detail/:id',
  },
  {
    component: 'workflow/processDefinition/design',
    meta: {
      activePath: '/workflow/processDefinition',
      icon: 'carbon:data-base',
      title: '流程设计',
      hideInMenu: true,
    },
    name: 'WorkflowDesign',
    path: '/workflow/design/index',
  },
  // 新增路由开始
  {
    component: '/examManage/questScoring/cpn/examScoring/index',
    meta: {
      activePath: '/examManage/questScoring',
      icon: 'carbon:checkmark',
      title: '考试阅卷',
      hideInMenu: true,
    },
    name: 'ExamScoring',
    path: '/examManage/questScoring/examScoring/:id?',
  },
  {
    component: '/examManage/questScoring/cpn/examCorrect/index',
    meta: {
      activePath: '/examManage/questScoring',
      icon: 'carbon:edit',
      title: '批改页面',
      hideInMenu: true,
    },
    name: 'ExamCorrect',
    path: '/examManage/questScoring/correct/:id',
  },

  {
    component: '/examManage/examAnalysis/cpn/examReport/index',
    meta: {
      activePath: '/examManage/examAnalysis',
      icon: 'carbon:chart',
      title: '考试统计',
      hideInMenu: true,
    },
    name: 'ExamReport',
    path: '/examManage/examAnalysis/report/:id',
  },
  {
    component: '/examManage/myExamPaper/cpn/examInfo/index',
    meta: {
      activePath: '/examManage/myExamPaper',
      icon: 'carbon:information',
      title: '考试信息',
      hideInMenu: true,
    },
    name: 'ExamInfo',
    path: '/examManage/myExamPaper/examInfo/:id',
  },
  // 新增路由结束
  {
    component: '/examManage/myExamPaper/cpn/startexamin/index',
    meta: {
      activePath: '/examManage/myExamPaper',
      icon: 'carbon:information',
      title: '开始考试',
      hideInMenu: true,
    },
    name: 'StartExamin',
    path: '/examManage/myExamPaper/startexamin/:id',
  },
  {
    component: '/examManage/myExamPaper/cpn/endexamin/completed',
    meta: {
      activePath: '/examManage/myExamPaper',
      icon: 'carbon:information',
      title: '考试完成',
      hideInMenu: true,
    },
    name: 'ExamCompleted',
    path: '/examManage/myExamPaper/completed/:id',
  },
  {
    component: '/examManage/myExamPaper/cpn/endexamin/result',
    meta: {
      activePath: '/examManage/myExamPaper',
      icon: 'carbon:information',
      title: '查看考试结果',
      hideInMenu: true,
    },
    name: 'ViewExamResult',
    path: '/examManage/myExamPaper/result/:id',
  },
  {
    component: '/oilstation/filter/detail',
    meta: {
      activePath: '/archive/oilstation/filter',
      icon: 'carbon:information',
      title: '过滤器详情',
      hideInMenu: true,
    },
    name: 'FilterDetail',
    path: '/archive/oilstation/filter/detail/:id',
  },
  {
    component: '/archive/HSSEManage/eventReport/detail',
    meta: {
      activePath: '/archive/HSSEManage/eventReport',
      icon: 'carbon:information',
      title: '事件报告详情',
      hideInMenu: true,
    },
    name: 'EventReportDetail',
    path: '/archive/HSSEManage/eventReport/detail/:id',
  },
  {
    component: '/system/assetManage/archivesManage/detail',
    meta: {
      activePath: '/system/assetManage/archivesManage',
      icon: 'carbon:information',
      title: '资产详情',
      hideInMenu: true,
    },
    name: 'AssetArchivesDetail',
    path: '/system/assetManage/archivesManage/detail/:id',
  },
  {
    component: '/schedule/work/class/component/addandedit',
    meta: {
      activePath: '/schedule/work/class',
      icon: 'carbon:information',
      title: '开班',
      hideInMenu: true,
    },
    name: 'AddClass',
    path: '/schedule/work/class/addandedit',
  },
  {
    component: '/aiAnalysis/camera/detail',
    meta: {
      activePath: '/aiAnalysis/camera',
      icon: 'carbon:information',
      title: '摄像头详情',
      hideInMenu: true,
    },
    name: 'CameraDetail',
    path: '/aiAnalysis/camera/detail/:cameraId',
  },
  {
    component: '/aiAnalysis/warning/detail',
    meta: {
      activePath: '/aiAnalysis/warning',
      icon: 'carbon:information',
      title: '预警详情',
      hideInMenu: true,
    },
    name: 'WarningDetail',
    path: '/aiAnalysis/warning/detail/:alertId',
  },
];

/**
 * 这里放本地路由
 */
export const localMenuList: RouteRecordStringComponent[] = [
  {
    component: 'BasicLayout',
    meta: {
      order: -1,
      title: 'page.dashboard.title',
      // 不使用基础布局（仅在顶级生效）
      noBasicLayout: true,
    },
    name: 'Dashboard',
    path: '/',
    redirect: '/analytics',
    children: [
      {
        name: 'Analytics',
        path: '/analytics',
        component: '/schedule/view/index',
        meta: {
          affixTab: true,
          title: 'page.dashboard.analytics',
        },
      },
      {
        name: 'Workspace',
        path: '/workspace',
        component: '/dashboard/workspace/index',
        meta: {
          title: 'page.dashboard.workspace',
        },
      },
      // {
      //   name: 'VbenDocument',
      //   path: '/vben-admin/document',
      //   component: 'IFrameView',
      //   meta: {
      //     icon: 'lucide:book-open-text',
      //     iframeSrc: 'https://dapdap.top',
      //     keepAlive: true,
      //     title: $t('demos.vben.document'),
      //   },
      // },
    ],
  },
  // {
  //   component: '/_core/about/index',
  //   meta: {
  //     icon: 'lucide:copyright',
  //     order: 9999,
  //     title: $t('demos.vben.about'),
  //   },
  //   name: 'About',
  //   path: '/vben-admin/about',
  // },
  ...localRoutes,
];
