/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{featureReferenceEquals as r,featureReferenceProperty as i}from"./featureReferenceUtils.js";import{Clonable as t}from"../core/Clonable.js";import{cyclicalDegrees as o}from"../core/Cyclical.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{equalsMaybe as l}from"../core/maybe.js";import{property as a,cast as n,subclass as p}from"../core/accessorSupport/decorators.js";import{ensureNumber as m}from"../core/accessorSupport/ensureType.js";import{persistable as u}from"../core/accessorSupport/decorators/persistable.js";import d from"../geometry/Point.js";import f from"../symbols/support/ElevationInfo.js";let c=class extends(s(t)){constructor(e){super(e),this.observer=null,this.farDistance=1e3,this.heading=0,this.tilt=90,this.horizontalFieldOfView=45,this.verticalFieldOfView=45,this.elevationInfo=null,this.feature=null}get valid(){return null!=this.observer&&this.farDistance>0}equals(e){return l(this.observer,e.observer)&&this.farDistance===e.farDistance&&this.heading===e.heading&&this.tilt===e.tilt&&this.horizontalFieldOfView===e.horizontalFieldOfView&&this.verticalFieldOfView===e.verticalFieldOfView&&l(this.elevationInfo,e.elevationInfo)&&r(this.feature,e.feature)}};e([a({type:d,json:{write:{isRequired:!0}}})],c.prototype,"observer",void 0),e([a({type:Number,nonNullable:!0,range:{min:0},json:{write:{isRequired:!0}}})],c.prototype,"farDistance",void 0),e([a({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),n(e=>o.normalize(m(e),void 0,!0))],c.prototype,"heading",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],c.prototype,"tilt",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:360},json:{write:{isRequired:!0}}})],c.prototype,"horizontalFieldOfView",void 0),e([a({type:Number,nonNullable:!0,range:{min:0,max:180},json:{write:{isRequired:!0}}})],c.prototype,"verticalFieldOfView",void 0),e([a({type:f}),u()],c.prototype,"elevationInfo",void 0),e([a(i)],c.prototype,"feature",void 0),e([a({readOnly:!0,json:{read:!1}})],c.prototype,"valid",null),c=e([p("esri.analysis.Viewshed")],c);export{c as default};
