import { KeepAliveProps, TransitionProps, UnwrapRef } from 'vue' import type { Router, RouteLocationNormalizedLoaded, NavigationGuard, RouteLocationNormalized, RouteLocationRaw } from 'vue-router' import { useNuxtApp } from '#app' export const useRouter = () => { return useNuxtApp().$router as Router } export const useRoute = () => { return useNuxtApp()._route as RouteLocationNormalizedLoaded } export interface PageMeta { [key: string]: any pageTransition?: boolean | TransitionProps layoutTransition?: boolean | TransitionProps key?: false | string | ((route: RouteLocationNormalizedLoaded) => string) keepalive?: boolean | KeepAliveProps } declare module 'vue-router' { interface RouteMeta extends UnwrapRef {} } const warnRuntimeUsage = (method: string) => console.warn( `${method}() is a compiler-hint helper that is only usable inside ` + '