import { createNameComponent } from '../createNode';

/** 首页系列 */
const dashboard = {
  /** 首页 */
  dashboard: createNameComponent(() => import('@/views/main/dashboard/index.vue')),
}

const formworkErection = {
  agencyAdmin: createNameComponent(() => import('@/views/main/formworkErection/appAdmin.vue')),
  channelType: createNameComponent(() => import('@/views/main/formworkErection/placementAdmin.vue')),
  channelAdmin: createNameComponent(() => import('@/views/main/formworkErection/channelAdmin.vue')),
}

const userModule = {
  onlineList: createNameComponent(() => import('@/views/main/userModule/onlineList.vue')),
  userList: createNameComponent(() => import('@/views/main/userModule/userList.vue')),
  relieveLogsList: createNameComponent(() => import('@/views/main/userModule/relieveLogsList.vue')),
  riskLogsList: createNameComponent(() => import('@/views/main/userModule/riskLogsList.vue')),
}

const withdrawModule = {
  withdrawModule: createNameComponent(() => import('@/views/main/withdrawModule/index.vue')),
}

const agentModule = {
  agentModule: createNameComponent(() => import('@/views/main/agentModule/index.vue')),
}

const operatorModule = {
  operatorModule: createNameComponent(() => import('@/views/main/operatorModule/index.vue')),
}

const riskModule = {
  riskControlConfig: createNameComponent(() => import('@/views/main/riskModule/riskControlConfig.vue')),
}

/** 导出所有路由，供后端配置使用 */
const allRoutes = {
  dashboard,
  formworkErection,
  userModule,
  withdrawModule,
  agentModule,
  operatorModule,
  riskModule,
}

export default allRoutes