/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../core/Clonable.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s,subclass as i}from"../../core/accessorSupport/decorators.js";import n from"./AttributeBinsGrouping.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";const l=new r({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),y=new r({naturalLog:"natural-log",squareRoot:"square-root"});let a=class extends(t(o)){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(l,{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:String,json:{write:!0}})],a.prototype,"firstDayOfWeek",void 0),e([s({type:String,json:{write:!0}})],a.prototype,"hideUpperBound",void 0),e([s({type:n,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],a.prototype,"splitBy",void 0),e([s({type:n,json:{write:{target:{stackBy:{type:n},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)=>n.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};
