/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as t}from"tslib";import e from"../Color.js";import{JSONMap as o}from"../core/jsonMap.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{toPt as i}from"../core/screenUtils.js";import{property as s,subclass as n}from"../core/accessorSupport/decorators.js";import{Integer as p}from"../core/accessorSupport/ensureType.js";import{VisualVariablesMixin as a}from"./mixins/VisualVariablesMixin.js";import l from"./support/AuthoringInfo.js";import u from"./support/RendererLegendOptions.js";import{enumeration as h}from"../core/accessorSupport/decorators/enumeration.js";var d;const m=new o({flow_from:"flow-from",flow_to:"flow-to"});let c=d=class extends(a(r)){constructor(t){super(t),this.density=.8,this.color=new e([255,255,255,1]),this.flowSpeed=10,this.trailLength=100,this.continuous=!0,this.perturb=null,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}get maxPathLength(){return this._get("maxPathLength")??200}set maxPathLength(t){this._set("maxPathLength",t)}get trailWidth(){return this._get("trailWidth")??1.5}set trailWidth(t){this._set("trailWidth",t)}get visualVariables(){return super.visualVariables}set visualVariables(t){super.visualVariables=t}clone(){const{density:t,maxPathLength:e,trailWidth:o,flowSpeed:r,trailLength:i,smoothing:s,flowRepresentation:n,trailCap:p,background:a}=this,l=this.color.clone(),u=(this.visualVariables||[]).map(t=>t.clone()),h=this.authoringInfo?.clone(),m=this.legendOptions?.clone();return new d({density:t,color:l,maxPathLength:e,trailWidth:o,flowSpeed:r,trailLength:i,trailCap:p,background:a,smoothing:s,flowRepresentation:n,visualVariables:u,authoringInfo:h,legendOptions:m})}getSymbol(t,e){}async getSymbolAsync(t,e){}getSymbols(){return[]}};t([s({type:Number,json:{write:!0}})],c.prototype,"density",void 0),t([s({type:e,json:{type:[p],write:{allowNull:!0}}})],c.prototype,"color",void 0),t([s({type:Number,cast:i,json:{write:!0}})],c.prototype,"maxPathLength",null),t([s({type:Number,cast:i,json:{write:!0}})],c.prototype,"trailWidth",null),t([s({type:Number,json:{write:!0}})],c.prototype,"flowSpeed",void 0),t([s({type:Number,json:{write:!0}})],c.prototype,"trailLength",void 0),t([s()],c.prototype,"continuous",void 0),t([s()],c.prototype,"perturb",void 0),t([s({type:Number,cast:i,json:{write:!1}})],c.prototype,"smoothing",void 0),t([s({type:m.apiValues,json:{type:m.jsonValues,read:{reader:m.read},write:{writer:m.write}}})],c.prototype,"flowRepresentation",void 0),t([h({flowRenderer:"flow"}),s({json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),t([s({type:l,json:{write:!0}})],c.prototype,"authoringInfo",void 0),t([s({type:u,json:{write:!0}})],c.prototype,"legendOptions",void 0),t([s({type:["butt","round"],json:{write:!0}})],c.prototype,"trailCap",void 0),t([s({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],c.prototype,"background",void 0),c=d=t([n("esri.renderers.FlowRenderer")],c);export{c as default};
