/*
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/maybe","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/ensureType","../../core/accessorSupport/decorators/subclass","../Slider/SliderViewModel","../smartMapping/support/utils"],(function(e,r,t,a,o,n,s,i,l,u){"use strict";let c=function(r){function a(t){var a;return(a=r.call(this,t)||this).average=null,a.bins=null,a.hasTimeData=!1,a.labelFormatFunction=r=>{if(a.hasTimeData)return u.formatDateLabel(r);const{max:t,min:o,precision:n}=e._assertThisInitialized(a),s=t-o>10?2:n;return u.formatNumberLabel(parseFloat(r.toFixed(s)))},a.rangeType="equal",a.standardDeviation=null,a}return e._inheritsLoose(a,r),a.prototype.generateWhereClause=function(e){const{rangeType:r,state:a,values:o}=this;if("ready"!==a||!o.length||t.isNone(e))return null;const n=o[0],s=o.length>1?o[o.length-1]:null;switch(r){case"equal":return`${e} = ${n}`;case"not-equal":return`${e} <> ${n}`;case"less-than":return`${e} < ${n}`;case"greater-than":return`${e} > ${n}`;case"at-least":return`${e} >= ${n}`;case"at-most":return`${e} <= ${n}`;case"between":return`${e} BETWEEN ${n} AND ${s}`;case"not-between":return`${e} NOT BETWEEN ${n} AND ${s}`;default:return null}},a}(l);r.__decorate([a.property()],c.prototype,"average",void 0),r.__decorate([a.property()],c.prototype,"bins",void 0),r.__decorate([a.property()],c.prototype,"hasTimeData",void 0),r.__decorate([a.property()],c.prototype,"labelFormatFunction",void 0),r.__decorate([a.property()],c.prototype,"rangeType",void 0),r.__decorate([a.property()],c.prototype,"standardDeviation",void 0),c=r.__decorate([i.subclass("esri.widgets.HistogramRangeSlider.HistogramRangeSliderViewModel")],c);return c}));
