/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
const e="overview",n=e=>n=>{const l=e.toLowerCase();return n.sublayers.find(e=>e.modelName?.toLowerCase()===l)??null},l=n("fullmodel"),t=n(e);function o(e){const n=l(e);null!=n&&(n.visible=!0);const o=t(e);null!=o&&(o.visible=!1)}function u(e,n){const l=s(e,n);if(null==l)return null;const t=l.fieldName;if(null==t||!t)return null;const o=r(e,t),u=new Map;for(const r of l.mostFrequentValues??[])"number"==typeof r&&u.set(r,null!=o?o.getName(r):String(r));return{fieldName:t,fieldValueMap:u}}function r(e,n){for(const l of e.allSublayers.items){const e="building-component"===l.type?l.getFieldDomain?.(n):null;if("coded-value"===e?.type)return e}return null}function s(e,n){const l=e.summaryStatistics?.fields??[],t=n.toLowerCase();return l.find(e=>e.modelName?.toLowerCase()===t)??null}export{r as findFieldCodedValueDomain,u as findFieldInfoByModelName,s as findFieldStatisticsByModelName,l as findFullModelSublayer,t as findOverviewSublayer,o as showFullModel};
