/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as r}from"../../core/deprecate.js";import o from"../../core/Logger.js";import{property as n,subclass as s}from"../../core/accessorSupport/decorators.js";let i=class extends e{constructor(t){super(t),this.average=null,this.bins=null,this.max=null,this.min=null,t?.suppressDeprecationWarning||r(o.getLogger(this),"Histogram","arcgis-histogram",{version:"5.1"})}normalizeCtorArgs(t={}){const{suppressDeprecationWarning:e,...r}=t;return r}get binRange(){const{bins:t}=this;return t&&t.length>1?t[t.length-1].maxValue-t[0].minValue:0}set labelFormatFunction(t){this._set("labelFormatFunction",t)}get range(){const{max:t,min:e}=this;return null!=t&&null!=e?t-e:0}get state(){const{bins:t,range:e}=this;return e>0&&t?.length?"ready":"disabled"}};t([n()],i.prototype,"average",void 0),t([n()],i.prototype,"bins",void 0),t([n({readOnly:!0})],i.prototype,"binRange",null),t([n()],i.prototype,"labelFormatFunction",null),t([n()],i.prototype,"max",void 0),t([n()],i.prototype,"min",void 0),t([n({readOnly:!0})],i.prototype,"range",null),t([n({readOnly:!0})],i.prototype,"state",null),i=t([s("esri.widgets.Histogram.HistogramViewModel")],i);const a=i;export{a as default};
