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