Liferay.Loader.define("@liferay/commerce-product-definitions-web@7.0.115/js/edit_cp_definition",["module","exports","require","frontend-js-web"],(function(e,t,n){window;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function _default(e){(function handlePublish({WORKFLOW_ACTION_PUBLISH:e,namespace:t}){document.getElementById("".concat(t,"publishButton")).addEventListener("click",(n=>{n.preventDefault();const o=document.getElementById("".concat(t,"workflowAction"));o&&(o.value=e),submitForm(document.getElementById("".concat(t,"fm")))}))})(e),function handleSaveAsDraft({message:e,namespace:t,showConfirmationMessage:n,title:a}){const c=document.getElementById("".concat(t,"saveAsDraftButton"));c&&c.addEventListener("click",(c=>{c.preventDefault();const d=document.getElementById("".concat(t,"fm")),i=document.createElement("input");i.name="".concat(t,"saveAsDraft"),i.type="hidden",i.value="true",d.appendChild(i),n?(0,o.openConfirmModal)({message:e,onConfirm:e=>{e&&submitForm(d)},title:a}):submitForm(d)}))}(e)};var o=n("frontend-js-web")}));
//# sourceMappingURL=edit_cp_definition.js.map