/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
import{watch as e}from"../../../../core/reactiveUtils.js";import{getObserverRGBA as t,observerConfiguration as o,targetConfiguration 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 c}from"../../webgl-engine/lib/GeometryUtil.js";const m=128,l=256,d=512;class f extends r{constructor(i,r){const m=s(t(i.effectiveTheme)),l=c(m,o.size,32,32),d=new n(l);super({view:i,renderObjects:[d],metadata:r,elevationInfo:{mode:"absolute-height",offset:0}}),a(this),this.themeHandle=e(()=>({color:t(i.effectiveTheme)}),e=>{m.setParameters(e)})}destroy(){this.themeHandle.remove(),super.destroy()}}class u extends r{constructor(e,t){const{size:o,visibleColor:r,occludedColor:s,undefinedColor:n}=i;super({view:e,renderObjects:[v(o,r,m),v(o,s,l),v(o,n,d)],metadata:t,elevationInfo:{mode:"absolute-height",offset:0}}),a(this)}}const p={visible:m,occluded:l,undefined:d};function v(e,t,o){return new n(c(s(t.toUnitRGBA()),e,32,32),o)}export{f as LineOfSightObserverManipulator,u as LineOfSightTargetManipulator,p as LineOfSightTargetManipulatorState};
