import { onMounted as r, onUnmounted as t } from "vue";
function f(o = () => !0) {
  function e(n) {
    if (o())
      return n.preventDefault(), n.returnValue = "";
  }
  r(() => addEventListener("beforeunload", e)), t(() => removeEventListener("beforeunload", e));
}
export {
  f as default
};
//# sourceMappingURL=useConfirmBeforeClosing.js.map
