/*
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/Accessor","../../core/has","../../core/maybe","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","./EffectView"],(function(e,t,i,c,r,f,n,o,s,l){"use strict";let u=function(t){function i(e){var i;return(i=t.call(this,e)||this)._filter=null,i.duration=c("mapview-transitions-duration"),i._excludedEffectView=new l.EffectView(e),i._includedEffectView=new l.EffectView(e),i}e._inheritsLoose(i,t);var f=i.prototype;return f.transitionStep=function(e,t){this._set("scale",t),this.transitioning?(this._includedEffectView.transitionStep(e,t),this._excludedEffectView.transitionStep(e,t),this.transitioning||(this._filter=null)):(this._excludedEffectView.scale=t,this._includedEffectView.scale=t)},f.end=function(){this._includedEffectView.end(),this._excludedEffectView.end(),this._filter=null},f._transitionTo=function(e){const t=this._get("featureEffect"),i=r.unwrap(e),c=r.unwrap(null==i?void 0:i.includedEffect),f=r.unwrap(null==i?void 0:i.excludedEffect),n=this._includedEffectView.canTransitionTo(c)&&this._excludedEffectView.canTransitionTo(f);this._includedEffectView.effect=c,this._excludedEffectView.effect=f,this._set("featureEffect",i),this._filter=(null==i?void 0:i.filter)||(null==t?void 0:t.filter)||null,n||this.end()},e._createClass(i,[{key:"excludedEffects",get:function(){return this._excludedEffectView.effects}},{key:"featureEffect",set:function(e){this._get("featureEffect")!==e&&this._transitionTo(e)}},{key:"filter",get:function(){var e;return this._filter||(null==(e=r.unwrap(this.featureEffect))?void 0:e.filter)||null}},{key:"hasEffects",get:function(){return this._excludedEffectView.hasEffects||this._includedEffectView.hasEffects}},{key:"includedEffects",get:function(){return this._includedEffectView.effects}},{key:"scale",set:function(e){this._set("scale",e),this._excludedEffectView.scale=e,this._includedEffectView.scale=e}},{key:"transitioning",get:function(){return this._excludedEffectView.transitioning||this._includedEffectView.transitioning}}]),i}(i);t.__decorate([f.property()],u.prototype,"_filter",void 0),t.__decorate([f.property()],u.prototype,"_excludedEffectView",void 0),t.__decorate([f.property()],u.prototype,"_includedEffectView",void 0),t.__decorate([f.property()],u.prototype,"duration",void 0),t.__decorate([f.property()],u.prototype,"excludedEffects",null),t.__decorate([f.property()],u.prototype,"featureEffect",null),t.__decorate([f.property()],u.prototype,"filter",null),t.__decorate([f.property()],u.prototype,"hasEffects",null),t.__decorate([f.property()],u.prototype,"includedEffects",null),t.__decorate([f.property({value:0})],u.prototype,"scale",null),t.__decorate([f.property()],u.prototype,"transitioning",null),u=t.__decorate([s.subclass("esri.layers.effects.FeatureEffectView")],u);return u}));
