Liferay.Loader.define("data-engine-js-components-web@1.0.112/js/core/components/PageRenderer/Layout.es",["module","exports","require","liferay!frontend-js-react-web$react","../../../utils/formId.es","../../hooks/useConfig.es","../../hooks/useEvaluate.es","../../hooks/useForm.es","../../hooks/usePage.es","../../thunks/fieldBlur.es","../../thunks/fieldChange.es","../../thunks/fieldFocus.es","../../utils/merge-variants.es","../Field/Field.es","./VariantsContext.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.Layout=function Layout({components:e,editable:t,itemPath:r,rows:m,viewMode:h}){const{containerElement:v,pageIndex:y}=(0,s.usePage)(),{activePage:P,defaultLanguageId:b,pages:w,title:x}=(0,u.useFormState)(),{allowNestedFields:_,submitButtonId:k}=(0,a.useConfig)(),F=(0,i.useEvaluate)(d.default),O=(0,u.useForm)(),j=(0,n.useContext)(p.VariantsContext),I=null!=e?e:(0,c.mergeVariants)(t,j);return n.default.createElement(I.Rows,{activePage:P,editable:t,itemPath:r,pageIndex:y,rows:m},(({index:e,row:a})=>n.default.createElement(I.Row,{itemPath:[...r,e],key:e,row:a},(i=>{let{column:u,index:s}=i,d=function _objectWithoutProperties(e,t){if(null==e)return{};var r,n,o=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(i,["column","index"]);return n.default.createElement(I.Column,_extends({activePage:P,allowNestedFields:_,column:u,editable:t,index:s,itemPath:[...r,e,s],key:s,pageIndex:y,row:a,rowIndex:e,viewMode:h},d),(a=>{var i,u;return n.default.createElement(g.Field,_extends({},a,{activePage:P,defaultLanguageId:b,editable:t,itemPath:[...r,e,s,a.index],key:null!==(i=null===(u=a.field)||void 0===u?void 0:u.instanceId)&&void 0!==i?i:a.field.name,onBlur:(e,t)=>O((0,l.default)({activePage:P,focusDuration:t,formId:(0,o.getFormId)((0,o.getFormNode)(v.current)),formPageTitle:w[P].title,properties:e,title:x})),onChange:e=>O(F({formId:(0,o.getFormId)((0,o.getFormNode)(v.current)),properties:e,submitButtonId:k})),onFocus:e=>O((0,f.default)({activePage:P,formId:(0,o.getFormId)((0,o.getFormNode)(v.current)),formPageTitle:w[P].title,properties:e,title:x})),pageIndex:y}))}))}))))};var 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={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=r("../../../utils/formId.es"),a=r("../../hooks/useConfig.es"),i=r("../../hooks/useEvaluate.es"),u=r("../../hooks/useForm.es"),s=r("../../hooks/usePage.es"),l=_interopRequireDefault(r("../../thunks/fieldBlur.es")),d=_interopRequireDefault(r("../../thunks/fieldChange.es")),f=_interopRequireDefault(r("../../thunks/fieldFocus.es")),c=r("../../utils/merge-variants.es"),g=r("../Field/Field.es"),p=r("./VariantsContext.es");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=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)}}}));
//# sourceMappingURL=Layout.es.js.map