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