/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers","../../chunks/tslib.es6","../../Color","../../core/JSONSupport","../../core/Logger","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/decorators/cast","../../core/accessorSupport/decorators/subclass","../../core/accessorSupport/ensureType"],(function(e,r,o,t,s,l,i,n,p,u,c){"use strict";var a;const d=s.getLogger("esri.renderers.support.AttributeColorInfo");let y=a=function(r){function o(e){var o;return(o=r.call(this,e)||this).color=null,o.field=null,o.label=null,o.valueExpression=null,o.valueExpressionTitle=null,o}e._inheritsLoose(o,r);var t=o.prototype;return t.castField=function(e){return null==e?e:"function"==typeof e?(d.error(".field: field must be a string value"),null):c.ensureString(e)},t.getAttributeHash=function(){return`${this.field}-${this.valueExpression}`},t.clone=function(){return new a({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})},o}(t.JSONSupport);r.__decorate([l.property({type:o,json:{type:[Number],write:!0}})],y.prototype,"color",void 0),r.__decorate([l.property({type:String,json:{write:!0}})],y.prototype,"field",void 0),r.__decorate([p.cast("field")],y.prototype,"castField",null),r.__decorate([l.property({type:String,json:{write:!0}})],y.prototype,"label",void 0),r.__decorate([l.property({type:String,json:{write:!0}})],y.prototype,"valueExpression",void 0),r.__decorate([l.property({type:String,json:{write:!0}})],y.prototype,"valueExpressionTitle",void 0),y=a=r.__decorate([u.subclass("esri.renderers.support.AttributeColorInfo")],y);return y}));
