/*
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 t from"../../Color.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import r from"../../core/Logger.js";import{property as s,cast as i,subclass as l}from"../../core/accessorSupport/decorators.js";import{ensureString as p}from"../../core/accessorSupport/ensureType.js";var n;let u=n=class extends o{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(r.getLogger(this).error(".field: field must be a string value"),null):p(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new n({color:this.color?.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};e([s({type:t,json:{type:[Number],write:!0}})],u.prototype,"color",void 0),e([s({type:String,json:{write:!0}})],u.prototype,"field",void 0),e([i("field")],u.prototype,"castField",null),e([s({type:String,json:{write:!0}})],u.prototype,"label",void 0),e([s({type:String,json:{write:!0}})],u.prototype,"valueExpression",void 0),e([s({type:String,json:{write:!0}})],u.prototype,"valueExpressionTitle",void 0),u=n=e([l("esri.renderers.support.AttributeColorInfo")],u);const a=u;export{a as default};
