/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as o}from"tslib";import{strict as t}from"../../core/jsonMap.js";import a from"../../core/Logger.js";import{property as r,subclass as e}from"../../core/accessorSupport/decorators.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";const n=t()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),l="percent-of-total",m="field",s=t=>{const s=t;let p=class extends s{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let o=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(o=t&&m||r&&l||null,t&&r&&a.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):o!==m&&o!==l||(o=null),o}set normalizationType(o){this._set("normalizationType",o)}};return o([r({type:String,json:{name:"parameters.normalizationField",write:!0}})],p.prototype,"normalizationField",void 0),o([r({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],p.prototype,"normalizationMaxValue",void 0),o([r({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],p.prototype,"normalizationMinValue",void 0),o([r({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],p.prototype,"normalizationTotal",void 0),o([i(n,{name:"parameters.normalizationType"})],p.prototype,"normalizationType",null),p=o([e("esri.rest.support.NormalizationBinParametersMixin")],p),p};export{s as NormalizationBinParametersMixin,n as normalizationTypeJsonMap};
