Liferay.Loader.define("layout-admin-web@5.0.150/js/EditLayout",["module","exports","require","frontend-js-web","./checkFriendlyURL"],(function(e,t,n){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function EditLayout({getFriendlyURLWarningURL:e,namespace:t,shouldCheckFriendlyURL:n}){const i=document.getElementById("".concat(t,"editLayoutFm")),onSubmit=async r=>{if(r.preventDefault(),r.stopPropagation(),n){const{shouldSubmit:t}=await(0,o.checkFriendlyURL)(e,new FormData(i));if(!t)return}const d=document.getElementById("".concat(t,"applyLayoutPrototype"));d&&"false"!==d.value?d&&"true"===d.value&&(0,a.openConfirmModal)({message:Liferay.Language.get("reactivating-inherited-changes-may-update-the-page-with-the-possible-changes-that-could-have-been-made-in-the-original-template"),onConfirm:e=>{e&&submitForm(i)}}):submitForm(i)};return i.addEventListener("submit",onSubmit),{dispose(){i.removeEventListener("submit",onSubmit)}}};var a=n("frontend-js-web"),o=n("./checkFriendlyURL")}));
//# sourceMappingURL=EditLayout.js.map