/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{destroyHandle as i,handlesGroup as s}from"../../../../core/handleUtils.js";import{removeMaybe as o}from"../../../../core/maybe.js";import{watch as a,syncAndInitial as r}from"../../../../core/reactiveUtils.js";import{property as l,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{getEffectiveElevationMode as m}from"../../../../support/elevationInfoUtils.js";import{Settings as c}from"../../interactive/editingTools/settings.js";import{OutlineVisualElement as v}from"../../interactive/visualElements/OutlineVisualElement.js";import{connectVisualization as p}from"../../../analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js";let h=class extends t{constructor(e){super(e),this._visualElementHandle=null}initialize(){this._settings=new c({getTheme:()=>this.view.effectiveTheme}),this.addHandles(p({analysisViewData:this.analysisViewData,remove:()=>this._remove(),show:e=>this._show(e)}))}destroy(){this._remove()}get updating(){return!1}_remove(){this._visualElementHandle=o(this._visualElementHandle)}_show(e){this._remove();const{view:t}=this,o=new v({view:t,geometry:this.analysisViewData.analysis.geometry,attached:!1,renderOccluded:8,isDecoration:!0}),l=[a(()=>this.analysisViewData.analysis.elevationInfo,e=>{o.elevationInfo=e,o.isDraped="on-the-ground"===m(!0,e)},r),a(()=>this.analysisViewData.analysis.geometry,e=>{o.geometry=e}),t.maskOccludee(e),i(o)];this._settings.visualElements.lineObjects.outline.apply(o),o.attached=!0,this._visualElementHandle=s(l)}};e([l({constructOnly:!0})],h.prototype,"view",void 0),e([l({constructOnly:!0})],h.prototype,"analysisViewData",void 0),e([l()],h.prototype,"updating",null),h=e([n("esri.views.3d.analysis.ElevationProfile.ElevationProfileGeometryVisualization3D")],h);export{h as ElevationProfileGeometryVisualization3D};
