"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");exports.useLassoKeyboardHandlers=function(t){var n=t.isLassoActive,r=t.isDrawing,o=t.drawingPointCount,a=t.isEditingPolygon,i=t.discardDrawing,s=t.completeDrawing,u=t.deletePolygon,c=r&&o>0;e.useEffect((function(){if(n){var e=function(e){"Escape"===e.key&&c?(e.preventDefault(),e.stopPropagation(),i()):"Enter"===e.key&&c&&o>=3?(e.preventDefault(),s()):"Delete"!==e.key&&"Backspace"!==e.key||!a||(e.preventDefault(),u())};return document.addEventListener("keydown",e,!0),function(){document.removeEventListener("keydown",e,!0)}}}),[n,c,o,a,i,s,u])};
//# sourceMappingURL=useLassoKeyboardHandlers.js.map
