 
import { createRouter, createWebHistory} from 'vue-router'
import { systemRoutes } from './system'
import { whitelistRoutes } from './whitelist'
import { createRouterGuards } from './router.guards.js'




const router = createRouter({
  history: createWebHistory(),
  routes: [ 
    ...systemRoutes,
    ...whitelistRoutes
  ],
})


export async function setupRouter(app) { 
  app.use(router)
  // 创建路由守卫
  createRouterGuards(router)
}

export default router;