/*
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{JSONMap as t}from"../../core/jsonMap.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{clone as r}from"../../core/lang.js";import{property as l,subclass as o}from"../../core/accessorSupport/decorators.js";import{cast as s}from"../../core/accessorSupport/decorators/cast.js";import n from"./AuthoringInfoSizeStop.js";var p;const a=new t({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),u=new t({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),y={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},m=["high-to-low","above-and-below","centered-on","extremes"],S=[...new Set([...["high-to-low","above-and-below","centered-on","extremes","above","below"],...["high-to-low","above-and-below","above","below","reference-size","spike"]])],c=["seconds","minutes","hours","days","months","years"],h=["circle","diamond","hexagon-flat","hexagon-pointy","square"],d=["triangle-closed-outline","triangle-gradient-fill-closed","triangle-gradient-fill-closed-outline","triangle-gradient-fill-open","triangle-gradient-fill-open-outline","triangle-open-outline","triangle-solid-fill-closed","triangle-solid-fill-closed-outline","triangle-solid-fill-open","triangle-solid-fill-open-outline"];let f=p=class extends i{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}get normalizationField(){return"reference-size"===this.theme||"spike"===this.theme?this._get("normalizationField"):null}set normalizationField(e){this._set("normalizationField",e)}get referenceSizeScale(){return"reference-size"===this.theme?this._get("referenceSizeScale"):null}set referenceSizeScale(e){this._set("referenceSizeScale",e)}get referenceSizeSymbolStyle(){return"reference-size"===this.theme?this._get("referenceSizeSymbolStyle"):null}set referenceSizeSymbolStyle(e){this._set("referenceSizeSymbolStyle",e)}get spikeSymbolStyle(){return"spike"===this.theme?this._get("spikeSymbolStyle"):null}set spikeSymbolStyle(e){this._set("spikeSymbolStyle",e)}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get sizeStops(){return"reference-size"===this.theme||"spike"===this.theme?this._get("sizeStops"):null}set sizeStops(e){this._set("sizeStops",e)}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new p({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,normalizationField:this.normalizationField,referenceSizeScale:this.referenceSizeScale,referenceSizeSymbolStyle:this.referenceSizeSymbolStyle,spikeSymbolStyle:this.spikeSymbolStyle,sizeStops:r(this.sizeStops),startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};e([l({types:y,json:{write:!0}})],f.prototype,"endTime",void 0),e([s("endTime")],f.prototype,"castEndTime",null),e([l({type:String,json:{write:!0}})],f.prototype,"field",void 0),e([l({type:Number,json:{write:!0}})],f.prototype,"maxSliderValue",void 0),e([l({type:Number,json:{write:!0}})],f.prototype,"minSliderValue",void 0),e([l({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"normalizationField",null),e([l({type:Number,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"referenceSizeScale",null),e([l({type:h,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"referenceSizeSymbolStyle",null),e([l({type:d,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"spikeSymbolStyle",null),e([l({types:y,json:{write:!0}})],f.prototype,"startTime",void 0),e([s("startTime")],f.prototype,"castStartTime",null),e([l({type:[n],json:{origins:{"web-scene":{write:!1}},write:!0}})],f.prototype,"sizeStops",null),e([l({type:a.apiValues,value:null,json:{type:a.jsonValues,read:a.read,write:a.write}})],f.prototype,"style",null),e([l({type:S,value:null,json:{type:S,origins:{"web-scene":{type:m,write:{writer:(e,t)=>{m.includes(e)&&(t.theme=e)}}}},write:!0}})],f.prototype,"theme",null),e([l({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],f.prototype,"type",void 0),e([l({type:c,json:{type:c,write:!0}})],f.prototype,"units",void 0),f=p=e([o("esri.renderers.support.AuthoringInfoVisualVariable")],f);const g=f;export{g as default};
