/**
 * 月/周单元格「进入日视图」：锚定日、清多选、过渡动画方向（由 Shell 持有路由状态）。
 */
import { useCallback } from 'react';
export function useBookingCalendarGoToDayFromCell(anchorDate, commitAnchor, commitView, setNavDirection, setTransitioningToDay, setSelectedFreeSlots, setSelectedBlockSlots, setSelectedResourceCells, setFocusedCourtId) {
  return useCallback(function (day, courtId, source) {
    setNavDirection(day > anchorDate ? 1 : -1);
    setTransitioningToDay({
      source: source
    });
    setSelectedFreeSlots([]);
    setSelectedBlockSlots([]);
    setSelectedResourceCells([]);
    commitAnchor(day);
    setFocusedCourtId(courtId || null);
    commitView('day');
  }, [anchorDate, commitAnchor, commitView, setFocusedCourtId, setNavDirection, setSelectedBlockSlots, setSelectedFreeSlots, setSelectedResourceCells, setTransitioningToDay]);
}