/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
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 p}from"../geometry/support/aaBoundingRect.js";import a from"./Layer.js";import n from"./support/TileInfo.js";import{TileKey as l}from"./support/TileKey.js";const m=new l(0,0,0);let c=class extends a{constructor(e){super(e),this.tileInfo=n.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??p();return m.level=e,m.row=t,m.col=o,m.extent=i,this.tileInfo.updateTileInfo(m),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:n})],c.prototype,"tileInfo",void 0),e([o({type:["show","hide"]})],c.prototype,"listMode",void 0),e([o()],c.prototype,"fullExtent",void 0),e([o({type:s})],c.prototype,"spatialReference",void 0),e([o({readOnly:!0,value:"base-elevation"})],c.prototype,"type",void 0),c=e([r("esri.layers.BaseElevationLayer")],c);const y=c;export{y as default};
