/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass"],(function(e,a,c,t,r,l,n,o){"use strict";const i=e=>{let r=function(e){function c(){var a;return(a=e.apply(this,arguments)||this).minScale=0,a.maxScale=0,a}return a._inheritsLoose(c,e),a._createClass(c,[{key:"effectiveScaleRange",get:function(){const e={minScale:this.minScale,maxScale:this.maxScale},a=this.parent;a&&"effectiveScaleRange"in a&&s(e,a.effectiveScaleRange);const c=this._get("effectiveScaleRange");return c&&c.minScale===e.minScale&&c.maxScale===e.maxScale?c:e}}]),c}(e);return c.__decorate([t.property({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),c.__decorate([t.property({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),c.__decorate([t.property({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=c.__decorate([o.subclass("esri.layers.mixins.ScaleRangeLayer")],r),r};function s(e,a){return e.minScale=e.minScale>0?a.minScale>0?Math.min(e.minScale,a.minScale):e.minScale:a.minScale,e.maxScale=e.maxScale>0?a.maxScale>0?Math.max(e.maxScale,a.maxScale):e.maxScale:a.maxScale,e}e.ScaleRangeLayer=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
