import type { Router } from 'vue-router';

let globalRouter: Router | null = null;

export function setGlobalRouter(router: Router) {
  globalRouter = router;
}

export function getGlobalRouter() {
  if (!globalRouter) {
    throw new Error('Global router is not initialized');
  }

  return globalRouter;
}
