/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{watch as r,initial as i}from"../../../../core/reactiveUtils.js";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import s from"../../../../geometry/Polygon.js";import{toExtent as a}from"../../../../geometry/support/aaBoundingRect.js";import{TileTreeDebugger as l}from"../../../support/TileTreeDebugger.js";let o=class extends l{constructor(e){super(e),this._enableTileScale=!1,this.enablePolygons=!1}initialize(){r(()=>this.enabled,e=>this.view.basemapTerrain.renderPatchBorders=e,i)}getTiles(){const e=null!=this.view.basemapTerrain.spatialReference?this.view.basemapTerrain.spatialReference:null;return this.view.basemapTerrain.renderedTiles.map(r=>({...r,lij:r.lij,level:r.level,geometry:s.fromExtent(a(r.extent,e))}))}getLabel(e){let r=super.getLabel(e);if(this._enableTileScale){const{tilingScheme:i}=this.view.basemapTerrain;r+=`\n${i.scaleAtLevel(e.level).toLocaleString("de-CH",{maximumFractionDigits:0})}`}return r}};o=e([t("esri.views.3d.layers.support.TerrainTileTree3DDebugger")],o);export{o as TerrainTileTree3DDebugger};
