Liferay.Loader.define("data-engine-taglib@3.3.53/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 DataEngineTaglibCompatibilityLayer(){const{dataLayoutBuilderId:e}=(0,i.useConfig)(),t=(0,i.useForm)(),{dataDefinition:a,dataLayout:s}=(0,i.useFormState)({schema:["dataDefinition","dataLayout"]}),d=(0,r.useRef)(null);return(0,r.useEffect)((()=>{d.current=new DataEngineCompatibilityLayer({dataDefinition:a,dataLayout:s,dispatch:t})}),[a,s,t]),(0,r.useEffect)((()=>(Liferay.component(e,d,{destroyOnNavigate:!0}),()=>{Liferay.destroyComponent(e)})),[d,e]),(0,r.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"),r=a("liferay!frontend-js-react-web$react");const e=Symbol("data.engine.internal");class DataEngineCompatibilityLayer{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