import { useGlobalStore } from '@store/globalStore'
import { static_data } from '@src/db/static_data'
import { useProgressBar } from '@store/Modules/ProgressBar'
import { tools } from '@tools'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useNotifStore } from '@store/NotifStore'

const progressBar = useProgressBar()

const getRouteData = async (to: any) => {
  if (!to.meta.transparent) {
    progressBar.start()
  }
  const titleToDisplay: any = await to.meta.asyncData(to)
}

const $router = useRouter()

// router().beforeEach(async (to: IMyRoute, from: IMyRoute, next) => {

// const getRouteData = async (to: IMyRoute | IMyRouteRecord) => {

/*
router().afterEach(async (from: IMyRoute, next) => {
  progressBar.finish()
  // AlertsStore.mutations.hideAlert()
  // EventBus.$emit('closePopups')
})
*/
