/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.25/esri/copyright.txt for details. */ import{_ as t}from"../../chunks/tslib.es6.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import r from"./VisualVariable.js";import o from"./support/OpacityStop.js";var i;let p=i=class extends r{constructor(t){super(t),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(t){t&&Array.isArray(t)&&(t=t.filter((t=>!!t))).sort(((t,s)=>t.value-s.value)),this._set("stops",t)}clone(){return new i({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map((t=>t.clone())),legendOptions:this.legendOptions&&this.legendOptions.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map((t=>t.value||0))}};t([s({readOnly:!0})],p.prototype,"cache",null),t([s({type:["opacity"],json:{type:["transparencyInfo"]}})],p.prototype,"type",void 0),t([s({type:String,json:{write:!0}})],p.prototype,"normalizationField",void 0),t([s({type:[o],json:{write:!0}})],p.prototype,"stops",null),p=i=t([e("esri.renderers.visualVariables.OpacityVariable")],p);const a=p;export{a as default};