/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../../../chunks/_rollupPluginBabelHelpers","../../../../core/screenUtils","../../state/controllers/global/ZoomController","../../state/controllers/local/ZoomController","../../../input/InputHandler","../../../input/handlers/support"],(function(e,t,r,o,n,l,a){"use strict";let i=function(e){function l(t,r,o){var n;return(n=e.call(this,!0)||this).view=t,n.pointerAction=r,n.registerIncoming("drag",o,(e=>n._handleDrag(e))),n}return t._inheritsLoose(l,e),l.prototype._handleDrag=function(e){const t=e.data;if(t.pointers.size>1)return;if(!a.eventMatchesMousePointerAction(e.data,this.pointerAction))return;const l=r.createScreenPointArray(t.center.x,t.center.y);switch(t.action){case"start":this.cameraController&&(this.cameraController.end(),this.cameraController=null),this.view.state.isGlobal?this.cameraController=new o.ZoomController({view:this.view}):this.cameraController=new n.ZoomController({view:this.view}),this.view.state.switchCameraController(this.cameraController),this.cameraController.begin(l);break;case"update":this.cameraController&&this.cameraController.update(l);break;case"end":this.cameraController&&(this.cameraController.end(),this.cameraController=null)}e.stopPropagation()},l}(l.InputHandler);e.DragZoom=i,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
