/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{__decorate as e}from"tslib";import{watch as r,syncAndInitial as t}from"../../../core/reactiveUtils.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";const s={drawHandles:"draw-handles"},a=a=>{const n=a;let l=class extends n{constructor(){super(...arguments),this.measurementService=null}initialize(){this.addHandles([r(()=>this.polylineDrawAction,e=>{this.removeHandles(s.drawHandles),e&&this.addHandles([e.on("cursor-update",e=>this.handleCreate(e)),e.on("vertex-add",e=>this.handleCreate(e)),e.on("draw-complete",e=>this.handleCreate(e))],s.drawHandles)},t),r(()=>this.viewModel?.measureType,()=>{this.resetPixels()})])}get draw(){return this.viewModel?.draw}get polylineDrawAction(){return this.viewModel?.polylineDrawAction}handleCreate(e){}resetPixels(){}};return e([i()],l.prototype,"draw",null),e([i()],l.prototype,"polylineDrawAction",null),e([i()],l.prototype,"viewModel",void 0),e([i()],l.prototype,"measurementService",void 0),l=e([o("esri.widgets.OrientedImageryViewer.mixins.DrawHandlerMixin")],l),l};export{a as DrawHandlerMixin};
