/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{isSome as t}from"../../../core/arrayUtils.js";function e(n){return n.flatMap(t=>f(t)?t.featureItems:o(t)?t.items.flatMap(t=>e([t])):t).filter(t)}function n(e){return e.flatMap(t=>o(t)?t.items.flatMap(t=>n([t])):f(t)&&t.total?t:null).filter(t)}function r(t){let e=0;for(const n of t)f(n)&&(e+=n.total),o(n)&&(e+=r(n.items));return e}function o(t){return null!=t&&"object"==typeof t&&"items"in t}function f(t){return null!=t&&"object"==typeof t&&"featureItems"in t}function i(t){return null!=t&&"object"==typeof t&&"graphic"in t}export{r as computeEffectiveCount,e as getNestedFeatureItems,n as getNestedLayerItems,i as isFeatureItem,o as isGroupLayerItem,f as isLayerItem};
