/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../core/Handles","../../../core/maybe","../../../core/reactiveUtils","./constants","./HoveredPoints","./InputRepresentation2D"],(function(e,t,n,i,s,o,a){"use strict";let r=function(){function e(e,n){this._handles=new t,this._inputRepresentation=new a.InputRepresentation2D({view:e}),this._hoveredPoints=new o.HoveredPoints({view:e}),this._handles.add([i.watch((()=>n.viewModel.hoveredPoints),(e=>this._hoveredPoints.update(e)),i.syncAndInitial),i.watch((()=>{const{state:e,highlightEnabled:t,viewModel:i}=n;return{input:i.input,state:e,highlightEnabled:t}}),(e=>this._updateInputRepresentation(e)),i.syncAndInitial)])}var r=e.prototype;return r.destroy=function(){this._handles=n.destroyMaybe(this._handles),this._inputRepresentation=n.destroyMaybe(this._inputRepresentation),this._hoveredPoints=n.destroyMaybe(this._hoveredPoints)},r._updateInputRepresentation=function({input:e,state:t,highlightEnabled:n}){t===s.ElevationProfileState.Selected&&n?this._inputRepresentation.update(e):this._inputRepresentation.remove()},e}();e.ElevationProfileView2D=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
