/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{getOrCreateMapValue as e}from"../../../../core/MapUtils.js";import r from"../../../../layers/support/LayerContingentValuesCache.js";import{isSubtypeSublayer as t}from"../../../../layers/support/layerUtils.js";const n=new Map;async function a(a){if(!(a=t(a)?a.parent:"feature"===a?.type?a:null))return null;const o=e(n,a,()=>{const e=r.createLoadedLayerContingentValuesCache(a);return a.addHandles({remove(){n.delete(a)}}),e});return await o??null}export{a as getLayerContingentValuesMetaData};
