/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../chunks/tslib.es6","../../../../geometry","../../../../core/Handles","../../../../core/reactiveUtils","../../../../core/accessorSupport/decorators/property","../../../../core/arrayUtils","../../../../core/has","../../../../core/accessorSupport/ensureType","../../../../core/accessorSupport/decorators/subclass","../../../../core/support/WatchUpdatingTracking","../../../support/TileTreeDebugger","../../../../geometry/Polygon"],(function(e,r,t,i,a,o,s,n,l,c,u,g,d,p){"use strict";e.FeatureTileTree3DDebugger=function(e){function t(r){var t;return(t=e.call(this,r)||this).watchUpdatingTracking=new g.WatchUpdatingTracking,t.handles=new a,t}r._inheritsLoose(t,e);var i=t.prototype;return i.initialize=function(){const{featureTiles:e}=this.view;this.handles.add(e.addClient()),this.watchUpdatingTracking.addOnCollectionChange((()=>null==e?void 0:e.tiles),(()=>this.update()),o.initial)},i.destroy=function(){this.handles&&(this.handles.destroy(),this.handles=null),this.watchUpdatingTracking.destroy()},i.getTiles=function(){const e=e=>{const[r,t,i]=e.lij;return p.fromExtent(this.view.featureTiles.tilingScheme.getExtentGeometry(r,t,i))};return this.view.featureTiles.tiles.toArray().sort(((e,r)=>e.loadPriority-r.loadPriority)).map((r=>({...r,geometry:e(r)})))},t}(d.TileTreeDebugger),t.__decorate([s.property({readOnly:!0})],e.FeatureTileTree3DDebugger.prototype,"watchUpdatingTracking",void 0),t.__decorate([s.property({readOnly:!0,aliasOf:"watchUpdatingTracking.updating"})],e.FeatureTileTree3DDebugger.prototype,"updating",void 0),t.__decorate([s.property()],e.FeatureTileTree3DDebugger.prototype,"view",void 0),e.FeatureTileTree3DDebugger=t.__decorate([u.subclass("esri.views.3d.layers.support.FeatureTileTree3DDebugger")],e.FeatureTileTree3DDebugger),Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
