/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{destroyHandle as r}from"../../../../core/handleUtils.js";import{ignoreAbortErrors as t}from"../../../../core/promiseUtils.js";import{when as s,initial as h,watch as p,syncAndInitial as a}from"../../../../core/reactiveUtils.js";import{property as o,subclass as l}from"../../../../core/accessorSupport/decorators.js";import{ImageHighlightHelper3D as g}from"./ImageHighlightHelper3D.js";import{MapServiceLayerViewHelper as c}from"../../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as d}from"../../../support/drapedUtils.js";let u=class extends i{constructor(e){super(e)}initialize(){this._highlightHelper=new g({layer:this.layerView.layer,view:this.view,updatingHandles:this.updatingHandles}),this._mapServiceLayerViewHelper=new c({createFetchPopupFeaturesQueryGeometry:(e,i)=>d(e,i,this.view),layerView:this.layerView,updatingHandles:this.updatingHandles,highlightGraphics:this._highlightHelper.graphics,highlightGraphicUpdated:e=>this._highlightHelper.graphicsView?.graphicChanged(e)}),this.addHandles([r(this._mapServiceLayerViewHelper),s(()=>this._mapServiceLayerViewHelper.highlightFeaturesActive&&this.view?.stationary,()=>t(this._mapServiceLayerViewHelper.updateHighlightedFeatures(this.view.resolution)),h),p(()=>this.layerView.suspended,e=>this._highlightHelper.suspended=e,a)])}fetchPopupFeaturesAtLocation(e,i){return this._highlightHelper.preload(),this._mapServiceLayerViewHelper.fetchPopupFeaturesAtLocation(e,i)}highlight(e,i){return this._highlightHelper.highlight(e,i)}};e([o()],u.prototype,"view",void 0),e([o()],u.prototype,"layerView",void 0),e([o()],u.prototype,"updatingHandles",void 0),u=e([l("esri.views.3d.layers.support.SublayerPopupHighlightHelper3D")],u);export{u as SublayerPopupHighlightHelper3D};
