/* COPYRIGHT Esri - https://js.arcgis.com/5.1.2/LICENSE.txt */
import{InputHandler as t}from"../InputHandler.js";class i extends t{constructor(t){super(!0),this._onChange=t,this._onPointerEvent=({data:t})=>{const i="pen"===t.pointerType;if(!i)return;const n=i?t.native.tiltX:void 0,e=i?t.native.tiltY:void 0;this._tiltX===n&&this._tiltY===e||(this._tiltX=n,this._tiltY=e,this._onChange(n,e))},this.registerIncoming("pointer-cancel",this._onPointerEvent),this.registerIncoming("pointer-capture-lost",this._onPointerEvent),this.registerIncoming("pointer-down",this._onPointerEvent),this.registerIncoming("pointer-enter",this._onPointerEvent),this.registerIncoming("pointer-leave",this._onPointerEvent),this.registerIncoming("pointer-move",this._onPointerEvent),this.registerIncoming("pointer-up",this._onPointerEvent)}get test(){return{reset:()=>{this._tiltX=void 0,this._tiltY=void 0}}}}export{i as LatestPen};
