// eslint-disable-next-line
import { UserLayout, BasicLayout, BasicLayoutWithoutTopnav, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [

  {
    path: '/',
    name: 'index',
    component: BasicLayoutWithoutTopnav,
    meta: { title: '首页' },
    redirect: '/taskGrouping',
    children: [
      {
        path: '/taskGrouping',
        name: 'taskGrouping',
        component: () => import('@/views/taskTemplate/taskGrouping'),
        meta: { title: '业务流程定义', keepAlive: true, permission: ['taskGrouping'] }
      },
     /* {
        path: '/taskDataStatistics',
        name: 'taskDataStatistics',
        component: () => import('@/views/taskDataStatistics'),
        meta: { title: '任务数据统计', keepAlive: true, permission: ['taskDataStatistics'] }
      }*/
    ]
  },
  {
    path: '/taskSetting',
    name: 'taskSetting',
    component: () => import('@/views/taskTemplate/taskDesign/taskSetting'),
    meta: { title: '任务基础设置', keepAlive: true, permission: ['taskSetting'] }
  },
  {
    path: '/taskFlow',
    name: 'taskFlow',
    component: () => import('@/views/taskTemplate/taskDesign/taskFlow'),
    meta: { title: '任务流程', keepAlive: true, permission: ['taskFlow'] }
  },
  {
    path: '/taskNewForm',
    name: 'taskNewForm',
    component: () => import('@/views/taskTemplate/taskDesign/taskNewForm'),
    meta: { title: '任务面板编辑', keepAlive: true }
  },
  {
    path: '/taskOtherSetting',
    name: 'taskOtherSetting',
    component: () => import('@/views/taskTemplate/taskDesign/taskOtherSetting'),
    meta: { title: '任务其他设置', keepAlive: true, permission: ['taskOtherSetting'] }
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      },
      {
        path: 'register',
        name: 'register',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
      },
      {
        path: 'register-result',
        name: 'registerResult',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
      }
    ]
  },

  {
    path: '/test',
    component: BlankLayout,
    redirect: '/test/home',
    children: [
      {
        path: 'home',
        name: 'TestHome',
        component: () => import('@/views/Home')
      },
      {
        path: 'test',
        name: 'test',
        component: () => import('@/views/testComponents')
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]
