"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),l=require("react"),a=require("./useMapClickHandler.js"),s=require("./useMapMoveHandler.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=u(e);exports.useMapEventCallbacks=function(e){var u=e.mapRef,n=e.isViewOnly,o=e.isRadiusToolActive,t=e.radiusDrawingHandlers,i=e.shouldSuppressClickRef,d=e.handleChangeOffsetWell,c=e.showTooltip,f=e.showClusterTooltip,p=e.hideTooltip,h=e.subjectWell,b=e.subjectWellCoords,C=l.useState(!1),M=r.default(C,2),v=M[0],k=M[1],w=l.useState(!1),g=r.default(w,2),j=g[0],T=g[1];return{isDragging:j,handleDragStart:l.useCallback((function(){return T(!0)}),[]),handleDragEnd:l.useCallback((function(){return T(!1)}),[]),handleMapClick:a.useMapClickHandler({mapRef:u,isViewOnly:n,isRadiusToolActive:o,radiusDrawingHandlers:t,shouldSuppressClickRef:i,handleChangeOffsetWell:d}),handleMouseMove:s.useMapMoveHandler({isRadiusToolActive:o,radiusDrawingHandlers:t,isSubjectWellHovered:v,showTooltip:c,showClusterTooltip:f,hideTooltip:p}),handleMouseLeave:l.useCallback((function(){return p()}),[p]),handleMouseDown:l.useCallback((function(e){o&&t.handleMouseDown(e)}),[o,t]),handleSubjectWellMouseEnter:l.useCallback((function(){k(!0),h&&b&&c({well:h,isOffsetWell:!1,isSubjectWell:!0,coords:b})}),[h,b,c]),handleSubjectWellMouseLeave:l.useCallback((function(){k(!1),p()}),[p])}};
//# sourceMappingURL=useMapEventCallbacks.js.map
