// eslint-disable-next-line
import { UserLayout, BasicLayout, PageView, BlankLayout, RouteView, IframeView } from '@/layouts'

/**
 * 登录成功后默认跳转的首页
 * @type { *[] }
 */

export const homePage = '/'

/**
 * 路由白名单设置
 * @type { *[] }
 */
export const allowList = ['login', 'jq', 'register', 'registerResult'] // no redirect allowList

/**
 * 前端未找到页面路由（固定不用改）
 */
export const notFoundRouter = {
  path: '*',
  redirect: '/404',
  hidden: true
}

/**
 * 基础路由：在没有从接口取数据生成路由时也可访问
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/default',
    name: 'default',
    component: BasicLayout,
    children: [
      {
        path: '/account/settings',
        name: 'settings',
        component: () => import('plg-platform-setting/views/platformSetting/personalCenter/Index'),
        meta: { title: '个人设置',icon:"setting", hideHeader: true },
        //hideChildrenInMenu: true
      }
    ]
  },
  {
    path: '/user',
    component: UserLayout,
    hidden: true,
    children: [
      {
        path: 'login',
        name: 'login',
        component: () => import(/* webpackChunkName: "login" */ '@/views/Login')
      }
    ]
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/global_page/exception/404')
  }
]

/**
 * 前端路由表
 */
export const constantRouterComponents = {
  // 基础页面 layout 必须引入
  BasicLayout: BasicLayout,
  BlankLayout: BlankLayout,
  RouteView: RouteView,
  PageView: PageView,
  IframeView: IframeView
  // 你需要动态引入的页面组件
  // result
  //ResultSuccess: () => import(/* webpackChunkName: "result" */ '@/template/result/Success'),
  //ResultFail: () => import(/* webpackChunkName: "result" */ '@/template/result/Error'),
  // exception
  //Exception403: () => import(/* webpackChunkName: "fail" */ '@/template/exception/403'),
  //Exception404: () => import(/* webpackChunkName: "fail" */ '@/template/exception/404'),
  //Exception500: () => import(/* webpackChunkName: "fail" */ '@/template/exception/500'),
  // account
  // AccountCenter: () => import('@/template/account/center'),
  // AccountSettings: () => import('@/template/account/settings/Index'),
  // BaseSettings: () => import('@/template/account/settings/BasicSetting'),
  // SecuritySettings: () => import('@/template/account/settings/Security'),
  // BindingSettings: () => import('@/template/account/settings/Binding'),
  // NotificationSettings: () => import('@/template/account/settings/Notification')
}
