/*
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","../../core/jsonMap","../../core/JSONSupport","../../core/Logger","../../core/accessorSupport/decorators/property","../../core/arrayUtils","../../core/has","../../core/accessorSupport/decorators/cast","../../core/accessorSupport/decorators/subclass","../../core/accessorSupport/ensureType","./support/VisualVariableLegendOptions"],(function(e,r,t,o,s,i,n,p,a,l,u,c){"use strict";const d=s.getLogger("esri.renderers.visualVariables.VisualVariable"),y=new t.JSONMap({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let _=function(r){function t(e){var t;return(t=r.call(this,e)||this).index=null,t.type=null,t.field=null,t.valueExpression=null,t.valueExpressionTitle=null,t.legendOptions=null,t}e._inheritsLoose(t,r);var o=t.prototype;return o.castField=function(e){return null==e?e:"function"==typeof e?(d.error(".field: field must be a string value"),null):u.ensureString(e)},o.clone=function(){},o.getAttributeHash=function(){return`${this.type}-${this.field}-${this.valueExpression}`},e._createClass(t,[{key:"arcadeRequired",get:function(){return!!this.valueExpression}}]),t}(o.JSONSupport);r.__decorate([i.property()],_.prototype,"index",void 0),r.__decorate([i.property({type:y.apiValues,readOnly:!0,json:{read:y.read,write:y.write}})],_.prototype,"type",void 0),r.__decorate([i.property({type:String,json:{write:!0}})],_.prototype,"field",void 0),r.__decorate([a.cast("field")],_.prototype,"castField",null),r.__decorate([i.property({type:String,json:{write:!0}})],_.prototype,"valueExpression",void 0),r.__decorate([i.property({type:String,json:{write:!0}})],_.prototype,"valueExpressionTitle",void 0),r.__decorate([i.property({readOnly:!0})],_.prototype,"arcadeRequired",null),r.__decorate([i.property({type:c,json:{write:!0}})],_.prototype,"legendOptions",void 0),_=r.__decorate([l.subclass("esri.renderers.visualVariables.VisualVariable")],_);return _}));
