Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/app/components/PublishButton",["module","exports","require","@frontend-taglib-clay$clayui/button","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../config/index","../utils/useCheckFormsValidity","./FormValidationModal"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({canPublish:e,formRef:t,label:r,onPublish:u}){const f=(0,l.default)(),[c,d]=(0,a.useState)(!1);return a.default.createElement(a.default.Fragment,null,a.default.createElement("form",{action:o.config.publishURL,method:"POST",ref:t},a.default.createElement("input",{name:"".concat(o.config.portletNamespace,"redirect"),type:"hidden",value:o.config.redirectURL}),a.default.createElement(n.default,{"aria-label":r,disabled:o.config.pending||!e,displayType:"primary",onClick:()=>{f().then((e=>{e?u():d(!0)}))},small:!0},r)),c&&a.default.createElement(i.FormValidationModal,{onCloseModal:()=>d(!1),onPublish:u}))};var n=f(r("@frontend-taglib-clay$clayui/button")),a=(f(r("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),o=r("../config/index"),l=f(r("../utils/useCheckFormsValidity")),i=r("./FormValidationModal");function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=PublishButton.js.map