/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as o}from"../../core/jsonMap.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import l from"./AttributeBinsGrouping.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";const n=new o({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),y=new o({naturalLog:"natural-log",squareRoot:"square-root"});let a=class extends(t(r)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};e([s({type:String,json:{name:"onExpression.value",write:!0}})],a.prototype,"expression",void 0),e([p(n,{name:"onExpression.valueType"})],a.prototype,"expressionValueType",void 0),e([s({type:String,json:{name:"onField",write:!0}})],a.prototype,"field",void 0),e([s({type:Number,json:{write:!0}})],a.prototype,"firstDayOfWeek",void 0),e([s({type:Boolean,json:{write:!0}})],a.prototype,"hideUpperBound",void 0),e([s({type:l,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],a.prototype,"splitBy",void 0),e([s({type:l,json:{write:{target:{stackBy:{type:l},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>l.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],a.prototype,"stackBy",void 0),e([p(y)],a.prototype,"transformation",void 0),a=e([i("esri.rest.support.BinParametersBase")],a);export{a as default};
