Liferay.Loader.define("data-engine-js-components-web@1.0.107/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"),d=_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:u}=e,c=_objectWithoutProperties(e,["editable","fieldActions"]);const{containerId:f,portletNamespace:p,view:g}=(0,o.useConfig)(),{activePage:y,displayable:m,editingLanguageId:b,focusedField:v,forceAriaUpdate:h,invalidFormMessage:P,pages:w,paginationMode:O,persistDefaultValues:j,readOnly:R,showPartialResultsToRespondents:_,viewMode:M}=(0,i.useFormState)(),{resource:k}=(0,s.useFieldTypesResource)(),I=(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 W=null!=t?t:I;return n.default.createElement("div",{"aria-labelledby":"".concat(p,"header"),className:(0,a.default)({sheet:"fieldSets"===g}),ref:W,role:"group",tabIndex:0},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:u,focusedFieldId:null==v?void 0:v.fieldName},w.map(((e,t)=>n.default.createElement(d.default,_extends({},c,{activePage:y,containerElement:W,editable:r,editingLanguageId:b,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 u=n.default.memo(e);t.default=u}}));
//# sourceMappingURL=Pages.es.js.map