Liferay.Loader.define("journal-web@5.0.100/js/DataEngineLayoutRendererLanguageProxy.es",["module","exports","require"],(function(e,a,n){window;{function t({dataEngineReactComponentRef:e,languageId:a,namespace:n,preserveValue:t=!1}){if(null==e?void 0:e.current){const u=document.getElementById("".concat(n,"defaultLanguageId"));e.current.updateEditingLanguageId({defaultLanguageId:u.value,editingLanguageId:a,preserveValue:t})}}Object.defineProperty(a,"__esModule",{value:!0}),a.default=function({currentLanguageId:e,namespace:a}){let n=null,u=null;return Liferay.componentReady("".concat(a,"dataEngineLayoutRenderer")).then((d=>{const o=null==d?void 0:d.reactComponentRef;n=Liferay.after("inputLocalized:localeChanged",(e=>{const n=e.item.getAttribute("data-value");t({dataEngineReactComponentRef:o,languageId:n,namespace:a})})),u=Liferay.after("inputLocalized:defaultLocaleChanged",(e=>{const n=e.item.getAttribute("data-value");document.getElementById("".concat(a,"defaultLanguageId")).value=n})),t({dataEngineReactComponentRef:o,languageId:e,namespace:a,preserveValue:!0})})),{dispose(){n&&n.detach(),u&&u.detach()}}}}}));
//# sourceMappingURL=DataEngineLayoutRendererLanguageProxy.es.js.map