/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{destroyMaybe as e}from"../../../../core/maybe.js";import{AFeatureContainer as t}from"../../engine/AFeatureContainer.js";import{GraphicInstanceStore as r}from"../../engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js";import n from"./GraphicBoundsRenderer.js";class s extends t{constructor(e,t=!1){super(e),this.drawOnTop=t,this._instanceStore=new r,this.checkHighlight=()=>!0}destroy(){super.destroy(),this._boundsRenderer=e(this._boundsRenderer)}get instanceStore(){return this._instanceStore}enableRenderingBounds(e){this._boundsRenderer=new n(e),this.requestRender()}get hasHighlight(){return this.checkHighlight()}onTileData(e,t){e.update(t),this.contains(e)||this.addChild(e),this.requestRender()}_renderChildren(e,t){e.selection=t;for(const r of this.children)r.visible&&(r.upload(this._instanceStore,1),r.getDisplayList()?.render(e))}}export{s as AGraphicContainer};
