/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import{createScreenPointArray as e}from"../../../../core/screenUtils.js";import{RotateController as t}from"../../state/controllers/RotateController.js";import{InputHandler as r}from"../../../input/InputHandler.js";class a extends r{constructor(e,t=!1){super(!0),this._view=e,this._invert=t,this.registerIncoming("vertical-two-finger-drag",e=>this._handleTwoFinger(e))}_handleTwoFinger(r){const a=this._invert?-1:1,o=e(0,r.data.delta*a);switch(r.data.action){case"begin":this._cameraController?.end(),this._cameraController=new t({view:this._view,pivot:0}),this._view.state.switchCameraController(this._cameraController),this._cameraController.begin(o);break;case"update":this._cameraController?.update(o);break;case"end":this._cameraController?.end(),this._cameraController=null}}}export{a as TwoFingerTilt};
