Liferay.Loader.define("data-engine-taglib@3.3.26/data_layout_builder/js/DataEngineTaglibCompatibilityLayer",["module","exports","require","@liferay/frontend-js-state-web","data-engine-js-components-web","frontend-js-components-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.DataEngineTaglibCompatibilityLayer=function(){const{dataLayoutBuilderId:e}=(0,i.useConfig)(),t=(0,i.useForm)(),{dataDefinition:a,dataLayout:d}=(0,i.useFormState)({schema:["dataDefinition","dataLayout"]}),u=(0,s.useRef)(null);return(0,s.useEffect)((()=>{u.current=new r({dataDefinition:a,dataLayout:d,dispatch:t})}),[a,d,t]),(0,s.useEffect)((()=>(Liferay.component(e,u,{destroyOnNavigate:!0}),()=>{Liferay.destroyComponent(e)})),[u,e]),(0,s.useEffect)((()=>{const{dispose:e}=n.State.subscribe(o.activeLanguageIdsAtom,(e=>{t({payload:{activeLanguageIds:e},type:i.EVENT_TYPES.LANGUAGE.UPDATE})}));return e}),[t]),null};var n=a("@liferay/frontend-js-state-web"),i=a("data-engine-js-components-web"),o=a("frontend-js-components-web"),s=a("liferay!frontend-js-react-web$react");const e=Symbol("data.engine.internal");class r{constructor(t){this[e]=t}get dispatch(){return this[e].dispatch}get state(){const{dataDefinition:t,dataLayout:a}=this[e];return{dataDefinition:t,dataLayout:a}}}}}));
//# sourceMappingURL=DataEngineTaglibCompatibilityLayer.js.map