/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../../core/maybe","./utils","./styles/Imagery","./styles/Particles","./styles/Stack","./styles/Streamlines"],(function(e,t,o,a,n,l){"use strict";const i=4,s=1,r=.5,c=!0,u=!0,g=2.3;function d(d,y){const{flowSpeed:m,trailLength:f}=d,S=t.getFlowSimulationSettings(d);let p=null;const w={opacity:t.getOpacity(d),size:t.getSize(d)};let h=t.getColor(d);if("none"===d.background)w.color=h;else{"constant"===h.kind&&(h={kind:"ramp",stops:[0,1],values:[0,0,0,1,h.value[0],h.value[1],h.value[2],h.value[3]],count:2});const e={loadImagery:y.loadImagery,timeExtent:y.timeExtent,color:h,opacity:{kind:"constant",value:[1]}};p=new o.default(e),w.color=t.getForegroundColor()}const v={loadImagery:y.loadImagery,createFlowMesh:y.createFlowMesh,simulationSettings:S,timeExtent:y.timeExtent,trailLength:f,flowSpeed:m,featheringSize:s,featheringOffset:r,introFade:c,fadeToZero:u,decayRate:g,color:w.color,opacity:w.opacity,size:w.size},z="butt"===d.trailCap||t.getMax(t.getSize(d))<=i?new l(v):new a.default(v);return e.isSome(p)?new n.default([p,z]):z}return d}));
