/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{createScreenPointArray as t}from"../../../../core/screenUtils.js";import{ZoomStepControllerGlobal as o}from"../../state/controllers/ZoomStepControllerGlobal.js";import{ZoomStepControllerLocal as e}from"../../state/controllers/ZoomStepControllerLocal.js";import{InputHandler as i}from"../../../input/InputHandler.js";import{eventMatchesPointerAction as r}from"../../../input/handlers/support.js";class s extends i{constructor(t,o){super(!0),this._view=t,this.registerIncoming("double-click",o,t=>this._handleDoubleClick(t))}_handleDoubleClick(i){const s=i.data;if(r(s,"primary")){const r=this._view.state.isGlobal?new o({view:this._view,mode:"animation"}):new e({view:this._view,mode:"animation"});this._view.state.switchCameraController(r),r.step(Math.log(.5)/Math.log(.6),t(s.x,s.y)),i.stopPropagation()}}}export{s as DoubleClickZoom};
