import{empty as e}from"../../utilities/asyncIterable.js";import{isPoint as t}from"../../utilities/esri.js";import{isBuildingComponentSublayer as r}from"../../utilities/layers.js";import{isWebScene as i}from"../../utilities/mapping.js";import{ClientSideIdentifyProvider as n}from"./ClientSideIdentifyProvider.js";export class BuildingComponentSublayerClientSideIdentifyProvider extends n{isSupported(e,t,n){const s=i(e?.layerExtension?.mapExtension?.map);return r(e.sublayer)&&s}_identify(t,r,i,n){return this._canIdentify(t,r)?super._identify(t,r,i,n):e()}async _count(e,t,r,i){return this._canIdentify(e,t)?super._count(e,t,r,i):{source:e,count:0}}_createQuery(e,t,r){const i=super._createQuery(e,t,r);return"mesh"===e.sublayer.geometryType&&(i.returnGeometry=!1),i}_canIdentify(e,r){return r&&e._layerView?.view?.extent?.intersects(t(r)?r:r.extent)}}