import{useCallback as r}from"react";import{getDistanceInMiles as t,getPixelToleranceInMiles as e,isInsideCircle as n,isNearCircleEdge as u}from"./utils/radius-geometry.js";import{clampRadius as i}from"./useRadiusDrawing.js";var a=function(a,o,c,l,f,g,s,d,m,v,p,h,j){return r((function(r){var w=a.current;if(o&&w){var x=r.lngLat,y={latitude:x.lat,longitude:x.lng};if(("drawing"===g.current||"resize"===g.current)&&s.current){var z=i(t(s.current,y));return v(z),void(d.current=z)}if("move"===g.current&&m.current){var D={latitude:x.lat-m.current.lat,longitude:x.lng-m.current.lng};return p(D),void(s.current=D)}if("confirming"===c.phase&&l&&f){var L=t(l,y),R=e(w,l),b=u(L,f,R);h(b),j(!b&&n(L,f,R))}else h(!1),j(!1)}}),[a,o,c.phase,l,f,g,s,d,m,v,p,h,j])};export{a as useRadiusMouseMove};
//# sourceMappingURL=useRadiusMouseMove.js.map
