/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as t}from"tslib";import{property as r,subclass as e}from"../../../../core/accessorSupport/decorators.js";import{Deconflictor as s}from"./Deconflictor.js";import{Yield as o}from"../../../support/Yield.js";const i=2e3;let n=class extends s{constructor(t){super(t),this.visibilityGroup=16,this.marginFactor=.05,this._lastDeconfliction=0}get viewState(){return this.parent.viewState}runTask(t){if(this.parent.readyToRun)return o;const r=performance.now();if("test"!==process.env.NODE_ENV&&2!==this.view.state.mode&&r-this._lastDeconfliction<i)return o;const e=super.runTask(t);return 0===this.state&&(this._lastDeconfliction=r),e}};t([r({constructOnly:!0})],n.prototype,"parent",void 0),n=t([e("esri.views.3d.layers.graphics.LabelDeconflictor")],n);export{n as LabelDeconflictor};
