import{useCallback as e}from"react";import{clampRadius as n}from"./useRadiusDrawing.js";var r=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)},i=function(i,s,t,u,a,l,o){return{confirm:e((function(){"confirming"===i.phase&&(null==u||u(s.map((function(e){return e.id}))),r(o),a({phase:"idle"}),l("none"))}),[i.phase,s,u,a,l,o]),cancel:e((function(){r(o),a({phase:"idle"}),l("none")}),[a,l,o]),setRadiusMilesExternal:e((function(e){if(t){var r=n(e);o.setRadiusMiles(r),o.radiusMilesRef.current=r,"confirming"===i.phase&&a({phase:"confirming",center:t,radiusMiles:r})}}),[t,i.phase,a,o])}};export{r as resetAllRadiusState,i as useRadiusActions};
//# sourceMappingURL=useRadiusActions.js.map
