/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","../core/JSONSupport","../core/lang","../core/Logger","../core/accessorSupport/decorators/property","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass","../views/3d/environment/SunnyWeather","../views/3d/environment/weather","./lightingTypes","./SunLighting","./VirtualLighting","./background/utils"],(function(e,t,r,o,n,i,s,l,a,p,c,u,h,g){"use strict";var d;const y=n.getLogger("esri.webscene.Environment"),b=(e,t,r)=>({enabled:!r||!r.isPresentation});let v=d=function(t){function r(e){var r;return(r=t.call(this,e)||this).lighting=new u,r.background=null,r.atmosphereEnabled=!0,r.starsEnabled=!0,r}e._inheritsLoose(r,t);var n=r.prototype;return n.clone=function(){return new d(this.cloneConstructProperties())},n.cloneConstructProperties=function(){return{lighting:this.lighting&&"virtual"===this.lighting.type?h.prototype.clone.call(this.lighting):u.prototype.clone.call(this.lighting),background:o.clone(this.background),atmosphereEnabled:this.atmosphereEnabled,starsEnabled:this.starsEnabled,weather:this.weather.clone()}},e._createClass(r,[{key:"weather",set:function(e){p.validateWeatherType(null==e?void 0:e.type,y)&&this._set("weather",e)}}]),r}(r.JSONSupport);t.__decorate([i.property({types:c.lightingTypes,nonNullable:!0,json:{write:!0}})],v.prototype,"lighting",void 0),t.__decorate([i.property(g.backgroundProperty)],v.prototype,"background",void 0),t.__decorate([i.property({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:b}}})],v.prototype,"atmosphereEnabled",void 0),t.__decorate([i.property({type:Boolean,nonNullable:!0,json:{write:{overridePolicy:b}}})],v.prototype,"starsEnabled",void 0),t.__decorate([i.property({types:p.weatherTypes,nonNullable:!0,json:{write:!0},value:new a})],v.prototype,"weather",null),v=d=t.__decorate([l.subclass("esri.webscene.Environment")],v);return v}));
