"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const Vue = require("vue");
const routeProps = {
  to: [String, Object],
  url: String,
  replace: Boolean
};
function route({ to, url, replace, $router: router }) {
  if (to && router) {
    router[replace ? "replace" : "push"](to);
  } else if (url) {
    replace ? location.replace(url) : location.href = url;
  }
}
function useRoute() {
  const vm = Vue.getCurrentInstance().proxy;
  return () => route(vm);
}
exports.route = route;
exports.routeProps = routeProps;
exports.useRoute = useRoute;
