Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.105/admin/js/components/DefaultPage",["module","exports","require","@frontend-taglib-clay$clayui/button","data-engine-js-components-web","liferay!frontend-js-react-web$react","./DefaultPage.scss","./DefaultPageHeader"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(a("@frontend-taglib-clay$clayui/button")),n=a("data-engine-js-components-web"),l=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 a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));a("./DefaultPage.scss");var d=o(a("./DefaultPageHeader"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function o(e){return e&&e.__esModule?e:{default:e}}const e=({formDescription:e,formReportDataURL:t,formTitle:a,pageDescription:u,pageTitle:o,showPartialResultsToRespondents:i,showSubmitAgainButton:f})=>{const[c,s]=(0,l.useState)(!1);return(0,l.useEffect)((()=>{const e=document.querySelector(".portal-popup");return null==e||e.classList.add("lfr-ddm__default-page-background"),()=>{null==e||e.classList.remove("lfr-ddm__default-page-background")}}),[]),l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{className:"container-fluid container-fluid-max-xl lfr-ddm__default-page"},l.default.createElement(d.default,{description:e,onClickBack:c?()=>s(!1):void 0,title:a}),c?l.default.createElement(n.PartialResults,{reportDataURL:t}):l.default.createElement("div",{className:"lfr-ddm__default-page-container"},l.default.createElement("h2",{className:"lfr-ddm__default-page-title"},o),l.default.createElement("p",{className:"lfr-ddm__default-page-description"},u),l.default.createElement("div",{className:"lfr-ddm__default-page-buttons"},f&&l.default.createElement(r.default,{displayType:"secondary",onClick:()=>window.location.reload()},Liferay.Language.get("submit-again")),i&&t&&l.default.createElement(r.default,{displayType:"secondary",onClick:()=>s(!0)},Liferay.Language.get("preview-existing-submissions"))))))};e.displayName="DefaultPage";var i=e;t.default=i}}));
//# sourceMappingURL=DefaultPage.js.map