Liferay.Loader.define("data-engine-taglib@3.3.53/data_layout_builder/js/utils/dataDefinition.es",["module","exports","require","./lang.es"],(function(e,i,t){window;{Object.defineProperty(i,"__esModule",{value:!0}),i.forEachDataDefinitionField=forEachDataDefinitionField,i.getDataDefinitionField=getDataDefinitionField,i.getFieldLabel=function getFieldLabel(e,i){const t=getDataDefinitionField(e,i);if(t)return(0,n.getLocalizedValue)(e.defaultLanguageId,t.label);return i},i.getOptionLabel=function getOptionLabel(e={},i,t=themeDisplay.getDefaultLanguageId(),n=themeDisplay.getLanguageId()){const getLabel=t=>{var n;if(e[t])return null===(n=e[t].find((e=>e.value===i)))||void 0===n?void 0:n.label};return getLabel(n)||getLabel(t)||i};var n=t("./lang.es");function forEachDataDefinitionField(e={dataDefinitionFields:[]},i){const{dataDefinitionFields:t=[]}=e;for(let e=0;e<t.length;e++){const n=t[e];if(i(n))return!0;if(forEachDataDefinitionField({dataDefinitionFields:n.nestedDataDefinitionFields||[]},i))return!0}return!1}function getDataDefinitionField(e={dataDefinitionFields:[]},i){let t=null;return forEachDataDefinitionField(e,(e=>e.name===i&&(t=e,!0))),t}}}));
//# sourceMappingURL=dataDefinition.es.js.map