/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"../../../core/Collection.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import r from"./AnalysisView3D.js";import{ElevationProfileLineSceneComputation as s}from"./ElevationProfile/ElevationProfileLineSceneComputation.js";import{ElevationProfileVisualization3D as l}from"./ElevationProfile/ElevationProfileVisualization3D.js";import{ElevationProfileController as n}from"../../analysis/ElevationProfile/ElevationProfileController.js";import{ElevationProfileLineGroundComputation as a}from"../../analysis/ElevationProfile/ElevationProfileLineGroundComputation.js";import{ElevationProfileLineInputComputation as p}from"../../analysis/ElevationProfile/ElevationProfileLineInputComputation.js";import{ElevationProfileLineQueryComputation as u}from"../../analysis/ElevationProfile/ElevationProfileLineQueryComputation.js";import{ElevationProfileTool as c}from"../../analysis/ElevationProfile/ElevationProfileTool.js";let y=class extends r{constructor(t){super(t),this.type="elevation-profile-view-3d",this.analysis=null,this.indicatorRelativePosition=null}initialize(){const{analysis:t,view:e}=this;this._controller=new n({analysis:t,analysisViewData:this,view:e,computationFactory:{create:t=>{switch(t.profile.type){case"ground":return new a(t);case"input":return new p(t);case"query":return new u(t);case"scene":return new s(t)}}}}),this._visualization=new l({view:e,analysisViewData:this}),this._sketchTool=new c({view:e,analysisViewData:this})}destroy(){this._controller?.destroy(),this._visualization?.destroy(),this._sketchTool?.destroy()}get effectiveDisplayUnits(){return this._controller?.effectiveDisplayUnits??{distance:"meters",elevation:"meters"}}get error(){return this._controller?.error}get flatProfiles(){return this._controller?.flatProfiles??h}get indicatorPoints(){return this._controller?.indicatorPoints??[]}get interactive(){return super.interactive}set interactive(t){super.interactive=t}get progress(){return this._controller?.progress??0}get results(){return this._controller?.results??[]}get statistics(){return this._controller?.statistics}get updating(){return!0===this._controller?.updating||!0===this._visualization?.updating||!0===this._sketchTool?.updating}get visible(){return super.visible}set visible(t){super.visible=t}get sketchGraphic(){return this._sketchTool?.sketchGraphic}get toolState(){return this._sketchTool?.state??"idle"}place(t){return this._sketchTool.place(t)}pickFeature(t){return this._sketchTool.pickFeature(t)}get testData(){return{visualization:this._visualization}}};t([i({readOnly:!0})],y.prototype,"type",void 0),t([i({constructOnly:!0,nonNullable:!0})],y.prototype,"analysis",void 0),t([i({readOnly:!0})],y.prototype,"effectiveDisplayUnits",null),t([i({readOnly:!0})],y.prototype,"error",null),t([i()],y.prototype,"flatProfiles",null),t([i()],y.prototype,"indicatorRelativePosition",void 0),t([i()],y.prototype,"indicatorPoints",null),t([i({readOnly:!0})],y.prototype,"progress",null),t([i({readOnly:!0})],y.prototype,"results",null),t([i({readOnly:!0})],y.prototype,"statistics",null),t([i({readOnly:!0})],y.prototype,"updating",null),t([i()],y.prototype,"sketchGraphic",null),t([i()],y.prototype,"toolState",null),t([i()],y.prototype,"_controller",void 0),t([i()],y.prototype,"_visualization",void 0),t([i()],y.prototype,"_sketchTool",void 0),y=t([o("esri.views.3d.analysis.ElevationProfileAnalysisView3D")],y);const v=y,h=new e;export{v as default};
