"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("./utils/radius-geometry.js"),t=require("./useRadiusDrawing.js");exports.useRadiusMouseMove=function(i,n,u,a,s,l,c,o,d,g,v,f,p){return e.useCallback((function(e){var M=i.current;if(n&&M){var m=e.lngLat,I={latitude:m.lat,longitude:m.lng};if(("drawing"===l.current||"resize"===l.current)&&c.current){var j=t.clampRadius(r.getDistanceInMiles(c.current,I));return g(j),void(o.current=j)}if("move"===l.current&&d.current){var q={latitude:m.lat-d.current.lat,longitude:m.lng-d.current.lng};return v(q),void(c.current=q)}if("confirming"===u.phase&&a&&s){var x=r.getDistanceInMiles(a,I),C=r.getPixelToleranceInMiles(M,a),D=r.isNearCircleEdge(x,s,C);f(D),p(!D&&r.isInsideCircle(x,s,C))}else f(!1),p(!1)}}),[i,n,u.phase,a,s,l,c,o,d,g,v,f,p])};
//# sourceMappingURL=useRadiusMouseMove.js.map
