/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{__decorate as t}from"tslib";import{JSONSupport as i}from"../../core/JSONSupport.js";import{clone as e}from"../../core/lang.js";import{property as s,subclass as o}from"../../core/accessorSupport/decorators.js";import r from"./ExpressionInfo.js";import{getAggregateFieldType as n}from"./fieldUtils.js";var p;let a=class extends i{static{p=this}constructor(t){super(t),this.isAutoGenerated=!1,this.name=null,this.alias=null,this.onStatisticField=null,this.onStatisticExpression=null,this.statisticType=null}get type(){return this.layer?n(this,this.layer.fieldsIndex):null}clone(){return new p({name:this.name,alias:this.alias,isAutoGenerated:this.isAutoGenerated,onStatisticExpression:e(this.onStatisticExpression),onStatisticField:this.onStatisticField,statisticType:this.statisticType})}};t([s({type:Boolean,json:{write:!0}})],a.prototype,"isAutoGenerated",void 0),t([s({clonable:!1})],a.prototype,"layer",void 0),t([s({type:String,json:{write:!0}})],a.prototype,"name",void 0),t([s({type:String,json:{write:!0}})],a.prototype,"alias",void 0),t([s({type:String,json:{write:!0}})],a.prototype,"onStatisticField",void 0),t([s({type:r,json:{write:!0}})],a.prototype,"onStatisticExpression",void 0),t([s({type:String,json:{write:!0}})],a.prototype,"statisticType",void 0),t([s({readOnly:!0,clonable:!1,json:{read:!1}})],a.prototype,"type",null),a=p=t([o("esri.layers.support.AggregateField")],a);export{a as default};
