import { createRouter, createWebHistory } from 'vue-router'
import { scrollBehavior } from './scrollStorage'
import { registerRouterGuards } from './guards'
import { constantsRoute } from './route'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: constantsRoute,
  scrollBehavior,
})

registerRouterGuards(router)

export default router
