const loginAccount = () => import(/* webpackChunkName: "login" */ '@/components/loginAccount.vue')
const loginCode = () => import(/* webpackChunkName: "login" */ '@/components/loginCode.vue')
const password = () => import(/* webpackChunkName: "login" */ '@/components/password.vue')

export default [
  { path: '*', redirect: '/sofia' },
  {
    path: '/sofia',
    component: () => import(/* webpackChunkName: "sofia" */ '../pages/sofia/components/layout.vue'),
    children: [
      { path: '', redirect: 'login/index' },
      {
        path: 'login',
        component: () => import(/* webpackChunkName: "sofia" */ '../pages/sofia/login.vue'),
        children: [
          { path: '', redirect: 'index' },
          { path: 'index', component: loginAccount },
          { path: 'code', component: loginCode }
        ]
      },
      {
        path: 'password',
        component: () => import(/* webpackChunkName: "sofia" */ '../pages/sofia/password.vue'),
        children: [{ path: '', component: password }]
      }
    ]
  },
  {
    path: '/ciis',
    component: () => import(/* webpackChunkName: "ciis" */ '../pages/ciis/components/layout.vue'),
    children: [
      { path: '', redirect: 'login/index' },
      {
        path: 'login',
        component: () => import(/* webpackChunkName: "ciis" */ '../pages/ciis/login.vue'),
        children: [
          { path: '', redirect: 'index' },
          { path: 'index', component: loginAccount },
          { path: 'code', component: loginCode }
        ]
      },
      {
        path: 'password',
        component: () => import(/* webpackChunkName: "ciis" */ '../pages/ciis/password.vue'),
        children: [{ path: '', component: password }]
      }
    ]
  },
  {
    path: '/wmp',
    component: () => import(/* webpackChunkName: "wmp" */ '../pages/wmp/components/layout.vue'),
    children: [
      { path: '', redirect: 'login/index' },
      {
        path: 'login',
        component: () => import(/* webpackChunkName: "wmp" */ '../pages/wmp/login.vue'),
        children: [
          { path: '', redirect: 'index' },
          { path: 'index', component: loginAccount },
          { path: 'code', component: loginCode }
        ]
      },
      {
        path: 'password',
        component: () => import(/* webpackChunkName: "wmp" */ '../pages/wmp/password.vue'),
        children: [{ path: '', component: password }]
      }
    ]
  }
]
