/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{watch as e}from"../../../../core/reactiveUtils.js";import{targetConfiguration as t,getObserverRGBA as o,observerConfiguration as i}from"./LineOfSightConfiguration.js";import{Manipulator3D as r}from"../../interactive/Manipulator3D.js";import{createManipulatorMaterial as s}from"../../interactive/manipulatorUtils.js";import{RenderObject as n}from"../../interactive/RenderObject.js";import{disableDisplayOnGrab as a}from"../../interactive/editingTools/manipulatorUtils.js";import{createSphereGeometry as m}from"../../webgl-engine/lib/GeometryUtil.js";class l extends r{constructor(t,r){const l=s(o(t.effectiveTheme)),c=m(l,i.size,32,32),f=new n(c);super({view:t,renderObjects:[f],metadata:r,elevationInfo:{mode:"absolute-height",offset:0}}),a(this),this.themeHandle=e(()=>({color:o(t.effectiveTheme)}),e=>{l.setParameters(e)})}destroy(){this.themeHandle.remove(),super.destroy()}}class c extends r{constructor(e,o){const{size:i,visibleColor:r,occludedColor:s,undefinedColor:n}=t;super({view:e,renderObjects:[f(i,r,16),f(i,s,32),f(i,n,64)],metadata:o,elevationInfo:{mode:"absolute-height",offset:0}}),a(this)}}function f(e,t,o){return new n(m(s(t.toUnitRGBA()),e,32,32),o)}export{l as LineOfSightObserverManipulator,c as LineOfSightTargetManipulator};
