Liferay.Loader.define("data-engine-js-components-web@1.0.89/js/core/schema/DataDefinition.es",["module","exports","require","../../utils/dataConverter","../../utils/visitors.es","./Schema.es"],(function(e,i,a){window;{Object.defineProperty(i,"__esModule",{value:!0}),i.DataDefinitionSchema=void 0;var t=a("../../utils/dataConverter"),n=a("../../utils/visitors.es"),s=a("./Schema.es");class DataDefinitionSchema extends s.Schema{constructor(e){super("data_engine","dataDefinition",e)}get availableLanguageIds(){return this[s.SYMBOL_RAW].availableLanguageIds}get contentType(){return this[s.SYMBOL_RAW].dataDefinition.contentType}get dataDefinitionFields(){const{pages:e}=this[s.SYMBOL_RAW];if(this[s.SYMBOL_CACHE].dataDefinitionFields)return this[s.SYMBOL_CACHE].dataDefinitionFields;{const i=[];return new n.PagesVisitor(e).mapFields((e=>{const a=(0,t.fieldToDataDefinition)(e);i.push(a)})),this[s.SYMBOL_CACHE].dataDefinitionFields=i,this[s.SYMBOL_CACHE].dataDefinitionFields}}get defaultLanguageId(){return this[s.SYMBOL_RAW].defaultLanguageId}get id(){const{dataDefinition:{id:e}}=this[s.SYMBOL_RAW];return e}get name(){return this[s.SYMBOL_RAW].name}serialize(){return{availableLanguageIds:this.availableLanguageIds,contentType:this.contentType,dataDefinitionFields:this.dataDefinitionFields,defaultLanguageId:this.defaultLanguageId,id:this.id,name:this.name}}}i.DataDefinitionSchema=DataDefinitionSchema,function _defineProperty(e,i,a){return i in e?Object.defineProperty(e,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[i]=a,e}(DataDefinitionSchema,"props",["availableLanguageIds","dataDefinition","defaultLanguageId","id","name","pages"])}}));
//# sourceMappingURL=DataDefinition.es.js.map