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