/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import o from"./Analysis.js";import e from"./ShadowCast/DiscreteOptions.js";import i from"./ShadowCast/MinDurationOptions.js";import s from"./ShadowCast/TotalDurationOptions.js";import{equalsMaybe as a}from"../core/maybe.js";import{convertTime as r}from"../core/timeUtils.js";import{property as n,subclass as l}from"../core/accessorSupport/decorators.js";import p from"../geometry/Polygon.js";let u=class extends o{constructor(t){super(t),this.type="shadow-cast",this.geometry=null,this.utcOffset=null,this.startTimeOfDay=r(10,"hours","milliseconds"),this.endTimeOfDay=r(16,"hours","milliseconds"),this.mode="min-duration",this.visualizeSunlight=!1,this.discreteOptions=new e,this.totalDurationOptions=new s,this.minDurationOptions=new i,this.date??=new Date}set date(t){const o=new Date(t);o.setHours(0,0,0,0),this._set("date",o)}get valid(){return!0}equals(t){return this===t||super.equals(t)&&this.date.getTime()===t.date.getTime()&&this.utcOffset===t.utcOffset&&this.startTimeOfDay===t.startTimeOfDay&&this.endTimeOfDay===t.endTimeOfDay&&a(this.geometry,t.geometry)&&this.mode===t.mode&&this.visualizeSunlight===t.visualizeSunlight&&this.discreteOptions.equals(t.discreteOptions)&&this.totalDurationOptions.equals(t.totalDurationOptions)&&this.minDurationOptions.equals(t.minDurationOptions)}clear(){throw new Error("clear() is not supported on ShadowCastAnalysis.")}};t([n({type:["shadow-cast"]})],u.prototype,"type",void 0),t([n({type:Date,nonNullable:!0})],u.prototype,"date",null),t([n({type:p})],u.prototype,"geometry",void 0),t([n({})],u.prototype,"utcOffset",void 0),t([n({type:Number,nonNullable:!0})],u.prototype,"startTimeOfDay",void 0),t([n({type:Number,nonNullable:!0})],u.prototype,"endTimeOfDay",void 0),t([n({type:["discrete","min-duration","total-duration"],nonNullable:!0})],u.prototype,"mode",void 0),t([n({type:Boolean,nonNullable:!0})],u.prototype,"visualizeSunlight",void 0),t([n({type:e,nonNullable:!0})],u.prototype,"discreteOptions",void 0),t([n({type:s,nonNullable:!0})],u.prototype,"totalDurationOptions",void 0),t([n({type:i,nonNullable:!0})],u.prototype,"minDurationOptions",void 0),t([n({readOnly:!0})],u.prototype,"valid",null),u=t([l("esri.analysis.ShadowCastAnalysis")],u);const m=u;export{m as default};
