/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{property as i,subclass as o}from"../../core/accessorSupport/decorators.js";import{ElevationProfileInteraction as r}from"./ElevationProfileInteraction.js";import{ElevationProfileView as s}from"./support/ElevationProfileView.js";let n=class extends t{constructor(e){super(e),this.editable=!0,this.visible=!0,this.highlightEnabled=!0}initialize(){this.view=new s({tool:this}),this.interaction=new r({tool:this})}destroy(){this.interaction.destroy(),this.view.destroy()}get state(){const e=this.interaction?.state;switch(e){case"ready":return"ready";case"creating":return"creating";case"selecting":return"selecting";case"selected":return"selected";case"reshaping":case"reshaping-disabled":return"created"}}};e([i({nonNullable:!0})],n.prototype,"viewModel",void 0),e([i()],n.prototype,"view",void 0),e([i()],n.prototype,"interaction",void 0),e([i()],n.prototype,"editable",void 0),e([i()],n.prototype,"visible",void 0),e([i()],n.prototype,"highlightEnabled",void 0),n=e([o("esri.widgets.ElevationProfile.ElevationProfileTool")],n);export{n as ElevationProfileTool};
