Liferay.Loader.define("data-engine-js-components-web@1.0.79/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({components:e,editable:t,rows:r,viewMode:m}){const{containerElement:v,pageIndex:b}=(0,i.usePage)(),{activePage:h,defaultLanguageId:w}=(0,s.useFormState)(),{allowNestedFields:k,submitButtonId:O}=(0,a.useConfig)(),P=(0,u.useEvaluate)(d.default),F=(0,s.useForm)(),j=(0,n.useContext)(p.VariantsContext),I=null!=e?e:(0,c.mergeVariants)(t,j);return n.default.createElement(I.Rows,{activePage:h,editable:t,pageIndex:b,rows:r},(({index:e,row:r})=>n.default.createElement(I.Row,{key:e,row:r},(a=>{let{column:u,index:s}=a,i=function(e,t){if(null==e)return{};var r,n,o=function(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}(a,["column","index"]);return n.default.createElement(I.Column,y({activePage:h,allowNestedFields:k,column:u,editable:t,index:s,key:s,pageIndex:b,row:r,rowIndex:e,viewMode:m},i),(e=>{var r,a;return n.default.createElement(g.Field,y({},e,{activePage:h,defaultLanguageId:w,editable:t,key:null!==(r=null===(a=e.field)||void 0===a?void 0:a.instanceId)&&void 0!==r?r:e.field.name,onBlur:(e,t)=>F((0,l.default)({activePage:h,focusDuration:t,formId:(0,o.getFormId)((0,o.getFormNode)(v.current)),properties:e})),onChange:e=>F(P({properties:e,submitButtonId:O})),onFocus:e=>F((0,f.default)({activePage:h,formId:(0,o.getFormId)((0,o.getFormNode)(v.current)),properties:e})),pageIndex:b}))}))}))))};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=v();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"),u=r("../../hooks/useEvaluate.es"),s=r("../../hooks/useForm.es"),i=r("../../hooks/usePage.es"),l=m(r("../../thunks/fieldBlur.es")),d=m(r("../../thunks/fieldChange.es")),f=m(r("../../thunks/fieldFocus.es")),c=r("../../utils/merge-variants.es"),g=r("../Field/Field.es"),p=r("./VariantsContext.es");function m(e){return e&&e.__esModule?e:{default:e}}function v(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return v=function(){return e},e}function y(){return(y=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