Liferay.Loader.define("data-engine-js-components-web@1.0.89/js/core/hooks/useDataView.es",["module","exports","require","../schema/DataDefinition.es","../schema/DataLayout.es","../schema/Schema.es"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.useDataView=function useDataView(e,a){return a?parseSchema(e,a):e};var s=t("../schema/DataDefinition.es"),n=t("../schema/DataLayout.es"),o=t("../schema/Schema.es");const e={dataDefinition:s.DataDefinitionSchema,dataLayout:n.DataLayoutSchema},i={},getProps=(e,a)=>a.reduce(((a,t)=>(a[t]=e[t],a)),{}),isStaleRaw=(a,t,s)=>e[a].props.some((e=>t[e]!==s[o.SYMBOL_RAW][e])),createSchema=(a,t)=>{const s=e[a],n=new s(getProps(t,s.props));return i[a]=n,n},getSchema=(e,a)=>e in i?isStaleRaw(e,a,i[e])?(delete i[e],createSchema(e,a)):i[e]:createSchema(e,a),parseSchema=(e,a)=>a.reduce(((a,t)=>{const s=getSchema(t,e);return a[t]=s,a}),{})}}));
//# sourceMappingURL=useDataView.es.js.map