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

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

const formworkErection = {
  placementAdmin: createNameComponent(() => import('@/views/main/formworkErection/placementAdmin.vue')),
  adPlatformAdmin: createNameComponent(() => import('@/views/main/formworkErection/adPlatformAdmin.vue')),
  adSourceAdmin: createNameComponent(() => import('@/views/main/formworkErection/adSourceAdmin.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 outBagModule = {
  channelTypeAdmin: createNameComponent(() => import('@/views/main/outBagModule/channelTypeAdmin.vue')),
  channelPromotion: createNameComponent(() => import('@/views/main/outBagModule/channelPromotion.vue')),
  appAdmin: createNameComponent(() => import('@/views/main/outBagModule/appAdmin.vue')),
}

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

export default allRoutes