/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as r}from"../../../core/support/UpdatingHandles.js";let n=class extends t{constructor(){super(...arguments),this._ownHandlesKey=Symbol("remove-on-complete"),this._downstreamHandlesKey=Symbol("remove-on-downstream-change"),this._updateHandles=new r,this._isComplete=!1}get _session(){return this._context?.session}get updating(){return this._updateHandles.updating}start(e,t){this._context=e}complete(){const e=this._context?.session;e?.groupGeometryChanges(),e?.complete(),this._isComplete=!0,this.removeHandles(this._ownHandlesKey),this.removeHandles(this._downstreamHandlesKey)}};e([o()],n.prototype,"_context",void 0),e([o()],n.prototype,"_isComplete",void 0),e([o()],n.prototype,"_session",null),e([o()],n.prototype,"configuration",void 0),e([o()],n.prototype,"updating",null),n=e([s("esri.views.draw.plugins.PluginBase")],n);export{n as PluginBase};
