/*
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 e}from"tslib";import{watch as t,syncAndInitial as d}from"../../../core/reactiveUtils.js";import{property as n,subclass as o}from"../../../core/accessorSupport/decorators.js";const s={sketchHandles:"sketch-handles"},a=a=>{const i=a;let l=class extends i{initialize(){this.addHandles(t(()=>this.sketch,e=>{this.removeHandles(s.sketchHandles),e&&this.addHandles([e.on("create",e=>this.handleCreate(e)),e.on("update",e=>this.handleUpdate(e)),e.on("undo",e=>this.handleUndo(e)),e.on("redo",e=>this.handleRedo(e)),e.on("delete",e=>this.handleDelete(e)),e.on("destroy",()=>this.handleDestroy()),e.on("duplicate",e=>this.handleDuplicate(e)),t(()=>e.activeComponent,e=>{"draw-2d"!==e?.type&&"draw-3d"!==e?.type||(e.elevationLockOnVertexAddDisabled=!0)},d)],s.sketchHandles)},d))}get sketch(){return this.viewModel?.sketch}handleCreate(e){}handleUpdate(e){}handleUndo(e){}handleRedo(e){}handleDelete(e){}handleDestroy(){}handleDuplicate(e){}};return e([n()],l.prototype,"sketch",null),e([n()],l.prototype,"type",void 0),e([n()],l.prototype,"viewModel",void 0),l=e([o("esri.widgets.OrientedImageryViewer.mixins.SketchHandlerMixin")],l),l};export{a as SketchHandlerMixin};
