import { RouteLocationRaw, useRouter } from 'vue-router';

export function getRouterPath(location: RouteLocationRaw) {
  const router = useRouter();
  const { href } = router.resolve(location);
  return href;
}

export function goBack() {
  const router = useRouter();
  router.go(-1);
}
