Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.105/admin/js/components/TranslationManager.es",["module","exports","require","data-engine-js-components-web","liferay!frontend-js-react-web$react","../eventTypes.es"],(function(e,a,n){window;Object.defineProperty(a,"__esModule",{value:!0}),a.TranslationManager=function(){const e=(0,t.useForm)();return(0,o.useEffect)((()=>{const e=document.querySelector(".ddm-translation-manager");return e&&e.classList.remove("hide"),()=>{e&&e.classList.add("hide")}}),[]),(0,o.useEffect)((()=>{let a=[];return(async()=>{const n=await Liferay.componentReady("translationManager");a=[n.on("editingLocale",(({newValue:a})=>{e({payload:{editingLanguageId:a},type:t.EVENT_TYPES.LANGUAGE.CHANGE}),e({payload:{languageId:a},type:t.EVENT_TYPES.LANGUAGE.ADD})})),n.on("availableLocales",(({newValue:a,previousValue:n})=>{const o=[];n.forEach(((e,n)=>{a.has(n)||o.push(n)})),o.length&&(e({payload:{languageIds:o},type:t.EVENT_TYPES.LANGUAGE.DELETE}),e({payload:{languageId:o[0]},type:r.EVENT_TYPES.FORM_INFO.LANGUAGE_DELETE}))}))]})(),()=>{a.forEach((e=>e.detach()))}}),[e]),null};var t=n("data-engine-js-components-web"),o=n("liferay!frontend-js-react-web$react"),r=n("../eventTypes.es")}));
//# sourceMappingURL=TranslationManager.es.js.map