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/detail/segments',
                name: 'knowledge-segments',
                component: () => import('@/views/knowledge/detail/components/viewSegments/index.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'
        }
      }
    ]
  },
  {
    path: '/system',
    name: 'system',
    component: layout,
    redirect: '/system/user',
    meta: {
      title: '系统管理',
      icon: 'el-icon-setting',
      affix: true
    },
    children: [
      {
        path: '/system/user',
        name: 'system-user',
        component: () => import('@/views/system/user/index.vue'),
        meta: {
          title: '用户管理',
          icon: 'el-icon-user'
        }
      },
      {
        path: '/system/department',
        name: 'system-department',
        component: () => import('@/views/system/department/index.vue'),
        meta: {
          title: '部门管理',
          icon: 'el-icon-office-building'
        }
      },
      {
        path: '/system/role',
        name: 'system-role',
        component: () => import('@/views/system/role/index.vue'),
        meta: {
          title: '角色管理',
          icon: 'el-icon-s-custom'
        }
      }
    ]
  }, {
    path: '/intelligentAgent',
    name: 'intelligentAgent',
    component: layout,
    redirect: '/intelligentAgent/list',
    meta: {
      title: '智能体',
      icon: 'el-icon-home',
      affix: true
    },
    children: [
      {
        path: '/intelligentAgent/list',
        name: 'intelligentAgent-list',
        component: () => import('@/views/intelligent-agent/index.vue'),
        meta: {
          title: '智能体',
          icon: 'el-icon-home'
        }
      }
    ]
  }
]
