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