/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{DictionaryValue as t}from"../support/DictionaryValue.js";class s{static async create(i,e){if("count"===e.statisticType){const i=new t(1);return new s(e.name,e.alias,e.type,e.statisticType,i)}const a=await i.createComputedField({expression:e.onStatisticExpression?.expression,field:e.onStatisticField});return new s(e.name,e.alias,e.type,e.statisticType,a)}constructor(t,s,i,e,a){this.name=t,this.alias=s,this.type=i,this.statisticType=e,this.computed=a}}export{s as ComputedAggregateField};
