import type { Route } from '#/interfaces'

export const singleR: Route[] = [
  {
    componentName: 'appManage_appDetails',
    path: '/appManage/appDetails/:id*',
    componentPath: '/modules/appManage/appDetails/views/Home',
    props: true,
    isAddTab: true,
    name: '配置详情',
    parentPath: '/appManage/appConfig',
  },
  {
    componentName: 'userDetails',
    path: '/userDetails/:id*',
    componentPath: '/modules/userManagement/views/UserDetails/Home',
    isAddTab: true,
    name: '用户详情',
    props: true,
  },
  {
    componentName: 'setting_userData',
    path: '/setting/userData',
    componentPath: '/modules/setting/userData/views/Home',
    keepalive: true,
    isAddTab: true,
    name: '个人信息',
  },
  {
    componentName: 'setting_addModel',
    path: '/setting/addModel',
    componentPath: '/modules/setting/modelManage/views/addModel/Home',
    keepalive: true,
    isAddTab: true,
    name: '添加模型',
  },
  {
    componentName: 'setting_batchAdd',
    path: '/setting/batchAdd/:id',
    componentPath: '/modules/setting/modelManage/views/batchAdd/Home',
    keepalive: true,
    isAddTab: true,
    name: '批量添加',
  },
  {
    componentName: 'setting_preview',
    path: '/setting/preview/:id',
    componentPath: '/modules/setting/modelManage/views/preview/Home',
    keepalive: true,
    isAddTab: true,
    name: '预览模型',
  },
  {
    componentName: 'setting_recall',
    path: '/setting/recall/:id',
    componentPath: '/modules/setting/modelManage/views/recall/Home',
    keepalive: true,
    isAddTab: true,
    name: '查看召回',
  },
  {
    componentName: 'wordManage_wordList',
    path: '/wordManage/wordList/:id',
    componentPath: '/modules/wordManage/wordList/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '词汇详情',
    props: true,
  },
  {
    componentName: 'wordManage_wordDetail',
    path: '/wordManage/wordDetail/:id',
    componentPath: '/modules/wordManage/wordDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '单词详情',
    props: true,
  },
  {
    componentName: 'userManage_userDetails',
    path: '/userManage/userDetails/:id',
    componentPath: '/modules/userManage/userDetails/Home',
    isAddTab: true,
    keepalive: false,
    name: '用户详情',
    props: true,
  },
  {
    componentName: 'appManage_appConfigDetails',
    path: '/appManage/appConfigDetails/:id',
    componentPath: '/modules/appManage/appConfigDetails/Home',
    isAddTab: true,
    keepalive: false,
    name: '兑换码详情',
    props: true,
  },
  {
    componentName: 'readManage_bookDetail',
    path: '/readManage/bookDetail/:id',
    componentPath: '/modules/readManage/bookDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '书籍详情',
    props: true,
  },
  {
    componentName: 'readManage_bookAudioEdit',
    path: '/readManage/bookDetail/bookAudioEdit/:id',
    componentPath: '/modules/readManage/bookAudioEdit/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '音频编辑',
    props: true,
  },
  {
    componentName: 'sentenceManage_sentenceEditDetail',
    path: '/sentenceManage/sentenceEdit/sentenceEditDetail/:id',
    componentPath: '/modules/sentenceManage/sentenceEditDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '单句详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_sentenceHouseDetail',
    path: '/sentenceManage/sentenceHouse/sentenceHouseDetail/:id',
    componentPath: '/modules/sentenceManage/sentenceHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '单句库详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_newSentenceHouseDetail',
    path: '/sentenceManage/newSentenceHouse/newSentenceHouseDetail/:id',
    componentPath: '/modules/sentenceManage/newSentenceHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '新单句库详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_bookAudioEdit',
    path: '/sentenceManage/conversationEdit/conversationEditDetail/:id',
    componentPath: '/modules/sentenceManage/conversationEditDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '对话详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_shortEssayHouseDetail',
    path: '/sentenceManage/shortEssayHouse/shortEssayHouseDetail/:id',
    componentPath: '/modules/sentenceManage/shortEssayHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '短文库详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_newShortEssayHouseDetail',
    path: '/sentenceManage/newShortEssayHouse/newShortEssayHouseDetail/:id',
    componentPath:
      '/modules/sentenceManage/newShortEssayHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '新短文库详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_shortEssayEditDetail',
    path: '/sentenceManage/shortEssayEdit/shortEssayEditDetail/:id',
    componentPath: '/modules/sentenceManage/shortEssayEditDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '短文详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_conversationHouseDetail',
    path: '/sentenceManage/conversationHouse/conversationHouseDetail/:id',
    componentPath: '/modules/sentenceManage/conversationHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '对话库详情',
    props: true,
  },
  {
    componentName: 'sentenceManage_newConversationHouseDetail',
    path: '/sentenceManage/newConversationHouse/newConversationHouseDetail/:id',
    componentPath:
      '/modules/sentenceManage/newConversationHouseDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '新对话库详情',
    props: true,
  },
  {
    componentName: 'mallManage_twistedEggDetail',
    path: '/mallManage/twistedEgg/twistedEggDetail/:id',
    componentPath: '/modules/mallManage/twistedEggDetail/views/Home',
    isAddTab: true,
    keepalive: false,
    name: '扭蛋详情',
    props: true,
  },
  {
    componentName: 'mailboxManage_systemEmailDetail',
    path: '/mailboxManage/systemEmail/systemEmailDetail/:id',
    componentPath: '/modules/mailboxManage/systemEmailDetail/home',
    isAddTab: true,
    keepalive: false,
    name: '邮件详情',
    props: true,
  },
]

export const fullR: Route[] = [
  {
    componentName: 'login',
    path: '/login',
    componentPath: '/modules/login/views/Home',
  },
]

// function save() {
//     R.filter(i => i.children).forEach(i => {
//         i.children.forEach(j => {
//             saveMenuRule({
//                 pid: i.id,
//                 type: '1',
//                 name: j.title,
//                 componentName: j.name,
//                 componentPath: j.path,
//                 path: j.componentPath,
//                 sort: 0,
//                 keepalive: '1',
//                 status: '1',
//             })
//         })
//     })
// }
// save()
