/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../../../chunks/_rollupPluginBabelHelpers","../../../../core/maybe","./interfaces","./Loadable","./symbolComplexity"],(function(t,e,i,o,r){"use strict";let s=function(o){function s(t,e,i){var r;return(r=o.call(this,e)||this).symbol=t,r.convert=i,r.graphics3DSymbol=null,r.referenced=0,r}t._inheritsLoose(s,o);var a=s.prototype;return a.getSymbolLayerSize=function(t){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.getSymbolLayerSize(t):null},a.doLoad=function(){var i=t._asyncToGenerator((function*(t){const i=yield this.symbol.fetchSymbol({signal:t});i.id=this.symbol.id,this.graphics3DSymbol=this.convert(i),e.isSome(this.graphics3DSymbol)&&(yield this.graphics3DSymbol.load())}));function o(t){return i.apply(this,arguments)}return o}(),a.createGraphics3DGraphic=function(t){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.createGraphics3DGraphic(t,this):null},a.globalPropertyChanged=function(t,i){return!!e.isSome(this.graphics3DSymbol)&&this.graphics3DSymbol.globalPropertyChanged(t,i)},a.applyRendererDiff=function(t,o){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.applyRendererDiff(t,o):i.ApplyRendererDiffResult.Recreate_Symbol},a.prepareSymbolPatch=function(t){e.isSome(this.graphics3DSymbol)&&this.graphics3DSymbol.prepareSymbolPatch(t)},a.updateGeometry=function(t,i){return!!e.isSome(this.graphics3DSymbol)&&this.graphics3DSymbol.updateGeometry(t,i)},a.onRemoveGraphic=function(){},a.getFastUpdateStatus=function(){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.getFastUpdateStatus():{loading:1,fast:0,slow:0}},a.destroy=function(){e.isSome(this.graphics3DSymbol)&&this.graphics3DSymbol.destroy(),this.graphics3DSymbol=void 0,o.prototype.destroy.call(this)},t._createClass(s,[{key:"symbolLayers",get:function(){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.symbolLayers:[]}},{key:"extentPadding",get:function(){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.extentPadding:0}},{key:"complexity",get:function(){return e.isSome(this.graphics3DSymbol)?this.graphics3DSymbol.complexity:r.emptySymbolComplexity}},{key:"destroyed",get:function(){return void 0===this.graphics3DSymbol}}]),s}(o.Loadable);return s}));
