/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../core/Error.js";import{property as o,subclass as r}from"../core/accessorSupport/decorators.js";import i from"../geometry/Extent.js";import s from"../geometry/SpatialReference.js";import{create as a}from"../geometry/support/aaBoundingRect.js";import p from"./Layer.js";import{ScaleRangeLayer as n}from"./mixins/ScaleRangeLayer.js";import l from"./support/TileInfo.js";import{TileKey as m}from"./support/TileKey.js";const c=new m(0,0,0);let y=class extends(n(p)){constructor(e){super(e),this.tileInfo=l.create({spatialReference:s.WebMercator,size:256}),this.fullExtent=new i(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,s.WebMercator),this.spatialReference=s.WebMercator,this.type="base-elevation"}addResolvingPromise(e){super.addResolvingPromise(e)}getTileBounds(e,t,o,r){const i=r??a();return c.level=e,c.row=t,c.col=o,c.extent=i,this.tileInfo.updateTileInfo(c),i}fetchTile(){throw new t("BaseElevationLayer:fetchTile-not-implemented","fetchTile() is not implemented")}async queryElevation(e,t){const{query:o}=await this._importElevationQuery();return o(this,e,t)}createElevationSampler(e,t){return this._importElevationQuery().then(({createSampler:o})=>o(this,e,t))}_importElevationQuery(){return import("./support/ElevationQuery.js")}};e([o({type:l})],y.prototype,"tileInfo",void 0),e([o({type:["show","hide"]})],y.prototype,"listMode",void 0),e([o()],y.prototype,"fullExtent",void 0),e([o({type:s})],y.prototype,"spatialReference",void 0),e([o({readOnly:!0,value:"base-elevation"})],y.prototype,"type",void 0),y=e([r("esri.layers.BaseElevationLayer")],y);const f=y;export{f as default};
