Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/hooks/useShouldConfirmBeforeNavigate",["module","exports","require","liferay!frontend-js-react-web$react"],(function(e,r,a){window;Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(e,r=Liferay.Language.get("you-have-unsaved-changes-do-you-want-to-proceed-without-saving")){(0,n.useEffect)((()=>{const a=e=>{e.preventDefault(),e.returnValue=""},n=e=>{confirm(r)||e.originalEvent.preventDefault()};if(e)return window.addEventListener("beforeunload",a),Liferay.on("beforeNavigate",n),()=>{window.removeEventListener("beforeunload",a),Liferay.detach("beforeNavigate",n)}}),[e,r])};var n=a("liferay!frontend-js-react-web$react")}));
//# sourceMappingURL=useShouldConfirmBeforeNavigate.js.map