/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","./basicInterfaces"],(function(e,t){"use strict";var o;!function(e){e[e.Object=0]="Object",e[e.RenderGeometry=1]="RenderGeometry",e[e.External=2]="External",e[e.COUNT=3]="COUNT"}(o||(o={}));let c=function(){function e(){this.items=[]}var c=e.prototype;return c.addObject=function(e,t){this.items.push({type:o.Object,objectStateId:t,object:e})},c.addRenderGeometry=function(e,t,c){this.items.push({type:o.RenderGeometry,objectStateId:t,renderGeometry:e,owner:c})},c.addExternal=function(e,t){this.items.push({type:o.External,objectStateId:t,remove:e})},c.remove=function(e){for(let t=this.items.length-1;t>=0;--t){const o=this.items[t];o.objectStateId===e&&(this._removeObjectStateItem(o),this.items.splice(t,1))}},c.removeObject=function(e){for(let t=this.items.length-1;t>=0;--t){const c=this.items[t];c.type===o.Object&&c.object===e&&(this._removeObjectStateItem(c),this.items.splice(t,1))}},c.removeRenderGeometry=function(e){for(let t=this.items.length-1;t>=0;--t){const c=this.items[t];c.type===o.RenderGeometry&&c.renderGeometry===e&&(this._removeObjectStateItem(c),this.items.splice(t,1))}},c.removeAll=function(){this.items.forEach((e=>{this._removeObjectStateItem(e)})),this.items=[]},c._removeObjectStateItem=function(e){switch(e.type){case o.Object:e.objectStateId.channel===t.Object3DState.Highlight?e.object.removeHighlight(e.objectStateId):e.objectStateId.channel===t.Object3DState.MaskOccludee&&e.object.removeOcclude(e.objectStateId);break;case o.RenderGeometry:e.owner.removeRenderGeometryObjectState(e.renderGeometry,e.objectStateId);break;case o.External:e.remove(e.objectStateId)}},e}();e.Object3DStateSet=c,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
