/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
class e{constructor(e,o){this._loaded=!1,this._loadingPromise=null,this._context=null,this._symbol=null,this._symbolLayerRenderers=[],this._context=o,this._symbol=e}_destroy(){}get loaded(){return this._loaded}load(){return null==this._loadingPromise&&(this._loadingPromise=this._load()),this._loadingPromise}async _load(){const{_context:e,_symbol:o,_symbolLayerRenderers:t}=this,s=[];for(const a of o.symbolLayers){const o=e.symbolRendererFactory.createSymbolRendererFromSymbolLayer(a);null!=o&&(s.push(o.load()),t.push(o))}await Promise.all(s),this._loaded=!0}async createDestroyCommand(){const{_context:e,_symbolLayerRenderers:o}=this,t=[];for(const a of o)t.push(a.createDestroyCommand());const s=e.joinPipelineCommands(await Promise.all(t));return s.appendPipelineStateCommand(()=>this._destroy()),s}async createAddCommand(e){const{_context:o,_symbolLayerRenderers:t}=this,s=[];for(const a of t)s.push(a.createAddCommand(e));return o.joinPipelineCommands(await Promise.all(s))}async createRemoveCommand(e){const{_context:o,_symbolLayerRenderers:t}=this,s=[];for(const a of t)s.push(a.createRemoveCommand(e));return o.joinPipelineCommands(await Promise.all(s))}async createUpdateVisibilityCommand(e){const{_context:o,_symbolLayerRenderers:t}=this,s=[];for(const a of t)s.push(a.createUpdateVisibilityCommand(e));return o.joinPipelineCommands(await Promise.all(s))}async createUpdateLayerViewOpacityCommand(e){const{_context:o,_symbolLayerRenderers:t}=this,s=[];for(const a of t)s.push(a.createUpdateLayerViewOpacityCommand(e));return o.joinPipelineCommands(await Promise.all(s))}async createUpdateElevationCommand(e){const{_context:o,_symbolLayerRenderers:t}=this,s=[];for(const a of t)s.push(a.createUpdateElevationCommand(e));return o.joinPipelineCommands(await Promise.all(s))}}export{e as Point3DSymbolRenderer};
