Liferay.Loader.define("data-engine-js-components-web@1.0.75/js/core/components/Pages.es",["module","exports","require","./PageRenderer.soy","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../hooks/useConfig.es","../hooks/useForm.es","../hooks/useResource.es","./Actions.es","./PageRenderer/Page.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,r("./PageRenderer.soy");var n=f(r("liferay!frontend-js-react-web$classnames")),a=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("../hooks/useConfig.es"),s=r("../hooks/useForm.es"),i=r("../hooks/useResource.es"),l=r("./Actions.es"),d=f(r("./PageRenderer/Page.es"));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}}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}const e=a.default.forwardRef(((e,t)=>{let{editable:r,fieldActions:u}=e,f=p(e,["editable","fieldActions"]);const{containerId:g,portletNamespace:y,view:m}=(0,o.useConfig)(),{activePage:v,displayable:b,editingLanguageId:w,focusedField:O,forceAriaUpdate:P,invalidFormMessage:j,pages:h,paginationMode:M,persistDefaultValues:R,readOnly:k,showPartialResultsToRespondents:I,viewMode:E}=(0,s.useFormState)(),{resource:F}=(0,i.useFieldTypesResource)(),A=(0,a.useRef)();if(!(b||function({containerId:e,readOnly:t,viewMode:r}){return t||!r||null!==document.getElementById(e)}({containerId:g,readOnly:k,viewMode:E})))return null;const N=null!=t?t:A;return a.default.createElement("div",{className:(0,n.default)({sheet:"fieldSets"===m}),ref:N},a.default.createElement("input",{key:y+"persistDefaultValues",name:y+"persistDefaultValues",type:"hidden",value:R}),a.default.createElement("div",{className:(0,n.default)("lfr-ddm-form-container position-relative",{"ddm-user-view-content":!r})},a.default.createElement(l.ActionsProvider,{actions:u,focusedFieldId:null==O?void 0:O.fieldName},h.map(((e,t)=>a.default.createElement(d.default,c({},f,{activePage:v,containerElement:N,editable:r,editingLanguageId:w,fieldTypes:F,forceAriaUpdate:P,invalidFormMessage:j,key:t,page:e,pageIndex:t,pages:h,paginationMode:M,portletNamespace:y,readOnly:k,showPartialResultsToRespondents:I,total:h.length,view:m,viewMode:E})))))))}));e.displayName="Pages";var g=a.default.memo(e);t.default=g}}));
//# sourceMappingURL=Pages.es.js.map