/*
All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
*/
import{__decorate as t}from"tslib";import"../../../../core/has.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{Deconflictor as e}from"./Deconflictor.js";import{Yield as s}from"../../../support/Yield.js";const i=2e3;let n=class extends e{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 s;const r=performance.now();if(2!==this.view.state.mode&&r-this._lastDeconfliction<i)return s;const o=super.runTask(t);return 0===this.state&&(this._lastDeconfliction=r),o}};t([r({constructOnly:!0})],n.prototype,"parent",void 0),n=t([o("esri.views.3d.layers.graphics.LabelDeconflictor")],n);export{n as LabelDeconflictor};
