Liferay.Loader.define("data-engine-js-components-web@1.0.87/js/core/schema/DataLayout.es",["module","exports","require","./Schema.es"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.DataLayoutSchema=a.DataLayoutPageSchema=a.DataLayoutRowSchema=void 0;var o=t("./Schema.es");function ownKeys(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);a&&(o=o.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,o)}return t}function _objectSpread(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?ownKeys(Object(t),!0).forEach((function(a){_defineProperty(e,a,t[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))}))}return e}function _defineProperty(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}class DataLayoutRowSchema extends o.Schema{constructor(e){super("data_engine","dataLayoutRow",e)}get dataLayoutColumns(){return this[o.SYMBOL_RAW].columns.map((e=>({columnSize:e.size,fieldNames:e.fields.map((({fieldName:e})=>e))})))}serialize(){return{dataLayoutColumns:this.dataLayoutColumns}}}a.DataLayoutRowSchema=DataLayoutRowSchema;class DataLayoutPageSchema extends o.Schema{constructor(e){super("data_engine","dataLayoutPage",e)}get dataLayoutRows(){return this[o.SYMBOL_RAW].rows.map((e=>new DataLayoutRowSchema(e)))}get description(){var e;const a=this[o.SYMBOL_RAW].defaultLanguageId;return null!==(e=this[o.SYMBOL_RAW].localizedDescription)&&void 0!==e?e:{[a]:""}}get title(){var e;const a=this[o.SYMBOL_RAW].defaultLanguageId;return null!==(e=this[o.SYMBOL_RAW].localizedTitle)&&void 0!==e?e:{[a]:""}}serialize(){return{dataLayoutRows:this.dataLayoutRows.map((e=>e.serialize())),description:this.description,title:this.title}}}a.DataLayoutPageSchema=DataLayoutPageSchema;class DataLayoutSchema extends o.Schema{constructor(e){super("data_engine","dataLayout",e)}get dataRules(){return this[o.SYMBOL_RAW].rules.map((e=>_objectSpread(_objectSpread({},e),{},{name:{en_US:e.name}})))}get dataLayoutFields(){return this[o.SYMBOL_RAW].dataLayout.dataLayoutFields}get dataLayoutPages(){return this[o.SYMBOL_RAW].pages.map((e=>new DataLayoutPageSchema(e)))}get name(){return this[o.SYMBOL_RAW].name}get id(){var e;const{dataLayout:a,id:t}=this[o.SYMBOL_RAW];return null!=t?t:null==a||null===(e=a.dataLayout)||void 0===e?void 0:e.id}get paginationMode(){return this[o.SYMBOL_RAW].paginationMode}serialize(){return{dataLayoutFields:this.dataLayoutFields,dataLayoutPages:this.dataLayoutPages.map((e=>e.serialize())),dataRules:this.dataRules,id:this.id,name:this.name,paginationMode:this.paginationMode}}}a.DataLayoutSchema=DataLayoutSchema,_defineProperty(DataLayoutSchema,"props",["dataLayout","id","name","pages","paginationMode","rules"])}}));
//# sourceMappingURL=DataLayout.es.js.map