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