import layout from '@/views/app/layout/index.vue'
import redirect from '@/views/app/redirect/index.vue'

export default [
  {
    path: '/knowledge',
    name: 'knowledge',
    component: layout,
    redirect: '/knowledge/list',
    meta: {
      title: 'AI知识库',
      icon: 'el-icon-s-home',
      affix: true
    },
    children: [
      {
        path: '/knowledge/list',
        name: 'knowledge-list',
        component: redirect,
        // redirect: '/knowledge/list',
        meta: {
          title: '知识库',
          icon: 'el-icon-s-home',
          affix: true
        },
        children: [
          {
            path: '/knowledge/list',
            name: 'knowledge-home',
            component: () => import('@/views/knowledge/index.vue'),
            meta: {
              breadcrumb: false,
              title: '知识库',
              icon: 'el-icon-s-home'
            }
          },
          {
            path: '/knowledge/detail',
            name: 'knowledge-detail',
            component: redirect,
            redirect: '/knowledge/detail',
            hidden: true,
            meta: {
              title: '知识库详情',
              icon: 'el-icon-s-home'
            },
            children: [
              {
                path: '/knowledge/knowledge-create',
                name: 'knowledge-create',
                component: () => import('@/views/knowledge/detail/components/knowledgeForm.vue'),
                meta: {
                  breadcrumb: false,
                  title: '知识库详情',
                  icon: 'el-icon-s-home'
                }
              },

              {
                path: '/knowledge/detail',
                name: 'knowledge-detail-page',
                component: () => import('@/views/knowledge/detail/index.vue'),
                meta: {
                  breadcrumb: false,
                  title: '知识库详情',
                  icon: 'el-icon-s-home'
                }
              },
              {
                path: '/knowledge/detail/create',
                name: 'knowledge-create-page',
                component: () => import('@/views/knowledge/detail/create.vue'),
                meta: {
                  title: '知识库新增',
                  icon: 'el-icon-s-home'
                }
              }
            ]
          }
        ]
      },
      {
        path: '/knowledge/track',
        name: 'knowledge-track',
        component: redirect,
        redirect: '/knowledge/track',
        meta: {
          title: '任务轨迹',
          icon: 'el-icon-s-home',
          affix: true
        },
        children: [
          {
            path: '/knowledge/track',
            name: 'track-page',
            component: () => import('@/views/track/Index.vue'),

            meta: {
              breadcrumb: false,
              title: '任务轨迹',
              icon: 'el-icon-s-home'
            }
          },
          {
            path: '/rules',
            name: 'rules-page',
            component: () => import('@/views/rules/Index.vue'),
            hidden: true,
            meta: {
              title: '规则管理',

              icon: 'el-icon-s-home'
            }
          }
        ]
      },
      {
        path: '/knowledge/rule',
        name: 'knowledge-rule',
        component: redirect,
        redirect: '/knowledge/rule',
        meta: {
          title: '规则管理',
          icon: 'el-icon-s-home',
          affix: true
        },
        children: [
          {
            path: '/knowledge/rule',
            name: 'rule-page',
            component: () => import('@/views/rules/Index.vue'),
            meta: {
              title: '规则管理',
              icon: 'el-icon-s-home'
            }
          }
        ]
      },
    ]
  },
  {
    path: '/dify',
    name: 'dify',
    component: layout,
    redirect: '/dify/workflow',
    meta: {
      title: 'Dify',
      icon: 'el-icon-home',
      affix: true
    },
    children: [
      {
        path: '/dify/workflow',
        name: 'dify-workflow',
        component: () => import('@/views/dify/views/workflow/index.vue'),
        meta: {
          title: 'Dify',
          icon: 'el-icon-home'
        }
      }
    ]
  }
]
