"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("./useRadiusDrawing.js"),s=function(e){e.setCenter(null),e.centerRef.current=null,e.setRadiusMiles(null),e.radiusMilesRef.current=null,e.dragModeRef.current="none",e.dragOffsetRef.current=null,e.setIsDragging(!1),e.setIsHoveringEdge(!1),e.setIsHoveringInside(!1)};exports.resetAllRadiusState=s,exports.useRadiusActions=function(r,i,u,t,a,l,c){return{confirm:e.useCallback((function(){"confirming"===r.phase&&(null==t||t(i.map((function(e){return e.id}))),s(c),a({phase:"idle"}),l("none"))}),[r.phase,i,t,a,l,c]),cancel:e.useCallback((function(){s(c),a({phase:"idle"}),l("none")}),[a,l,c]),setRadiusMilesExternal:e.useCallback((function(e){if(u){var s=n.clampRadius(e);c.setRadiusMiles(s),c.radiusMilesRef.current=s,"confirming"===r.phase&&a({phase:"confirming",center:u,radiusMiles:s})}}),[u,r.phase,a,c])}};
//# sourceMappingURL=useRadiusActions.js.map
