/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{watch as t,sync as s}from"../../../core/reactiveUtils.js";import{property as i,subclass as r}from"../../../core/accessorSupport/decorators.js";import{PluginBase as a}from"./PluginBase.js";const o=Symbol("primary-vertex");let n=class extends a{constructor(){super(...arguments),this.enableHelpMessages=!1}get helpMessageKey(){return this.enableHelpMessages?"point":null}start(e){super.start(e);const{session:i,positionOfLastUserInput:r}=e;r&&i.appendOrReplacePoint(o,r),this._interactiveHandle||(this._interactiveHandle=e.createInteractiveHandle({defaultCaptureMode:"capture-always"}),this.addHandles([t(()=>this._interactiveHandle?.outputMapPosition,e=>{e&&!this._isComplete&&this._session?.appendOrReplacePoint(o,e)},s)],this._ownHandlesKey))}};e([i()],n.prototype,"enableHelpMessages",void 0),e([i()],n.prototype,"helpMessageKey",null),e([i()],n.prototype,"_interactiveHandle",void 0),n=e([r("esri.views.draw.plugins.PointPlugin")],n);export{n as PointPlugin};
