/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import r from"../../../../core/Handles.js";import{watch as t,initial as o}from"../../../../core/reactiveUtils.js";import{property as i}from"../../../../core/accessorSupport/decorators.js";import{viewshedToolManipulatorConfiguration as s}from"./ViewshedConfiguration.js";import{Manipulator3D as a}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as c}from"../../interactive/manipulatorUtils.js";import{RenderObject as n}from"../../interactive/RenderObject.js";import{createSphereGeometry as l}from"../../webgl-engine/lib/GeometryUtil.js";class m extends a{constructor(e,i){super({view:e,autoScaleRenderObjects:!1,worldSized:!1,radius:s.observerSize,interactive:!1}),this._handles=new r;const a=c(this._color);this.renderObjects=[new n(l(a,s.observerSize,32,32))],i.manipulators.add(this),this._handles.add([t(()=>this._color,e=>{a.setParameters({color:e})},o)])}destroy(){this._handles.remove(),super.destroy()}get _color(){return this.view.effectiveTheme.accentColor.toUnitRGBA()}}e([i()],m.prototype,"_color",null);export{m as ViewshedObserverManipulator};
