var __extends=this&&this.__extends||function(){var n=function(t,o){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])})(t,o)};return function(t,o){if("function"!=typeof o&&null!==o)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");function e(){this.constructor=t}n(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}}();import Interaction,{zoomByDelta}from"./Interaction.js";import MapBrowserEventType from"../MapBrowserEventType.js";var DoubleClickZoom=function(e){function t(t){var o=e.call(this)||this,t=t||{};return o.delta_=t.delta||1,o.duration_=void 0!==t.duration?t.duration:250,o}return __extends(t,e),t.prototype.handleEvent=function(t){var o,e,n,r=!1;return t.type==MapBrowserEventType.DBLCLICK&&(o=t.originalEvent,n=t.map,t=t.coordinate,e=o.shiftKey?-this.delta_:this.delta_,n=n.getView(),zoomByDelta(n,e,t,this.duration_),o.preventDefault(),r=!0),!r},t}(Interaction);export default DoubleClickZoom;