/*
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/has","../../../input/InputHandler"],(function(e,o,n,t){"use strict";var i;!function(e){e[e.IN=0]="IN",e[e.OUT=1]="OUT"}(i||(i={}));let r=function(e){function n(o,n,t){var r;return(r=e.call(this,!0)||this).view=o,r.keys=n,r._keysToZoomAction={},r.registerIncoming("key-down",t,(e=>r._handleKeyDown(e))),n.zoomIn.forEach((e=>r._keysToZoomAction[e]=i.IN)),n.zoomOut.forEach((e=>r._keysToZoomAction[e]=i.OUT)),r}o._inheritsLoose(n,e);var t=n.prototype;return t._handleKeyDown=function(e){this._handleKey(e)},t._handleKey=function(e){const o=e.modifiers;if(o.size>0&&!o.has("Shift"))return;const{key:n}=e.data;if(!(n in this._keysToZoomAction))return;const t=this._keysToZoomAction[n],{mapViewNavigation:r}=this.view;let s=null;switch(t){case i.IN:s=r.zoomIn();break;case i.OUT:s=r.zoomOut();break;default:return}r.begin(),s.then((()=>r.end())),e.stopPropagation()},n}(t.InputHandler);e.KeyZoom=r,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
