require("../../../../../_virtual/_rolldown/runtime.js");
let react = require("react");
//#region src/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.ts
/**
* 月/周单元格「进入日视图」：锚定日、清多选、过渡动画方向（由 Shell 持有路由状态）。
*/
function useBookingCalendarGoToDayFromCell(anchorDate, commitAnchor, commitView, setNavDirection, setTransitioningToDay, setSelectedFreeSlots, setSelectedBlockSlots, setSelectedResourceCells, setFocusedCourtId) {
	return (0, react.useCallback)((day, courtId, source) => {
		setNavDirection(day > anchorDate ? 1 : -1);
		setTransitioningToDay({ source });
		setSelectedFreeSlots([]);
		setSelectedBlockSlots([]);
		setSelectedResourceCells([]);
		commitAnchor(day);
		setFocusedCourtId(courtId || null);
		commitView("day");
	}, [
		anchorDate,
		commitAnchor,
		commitView,
		setFocusedCourtId,
		setNavDirection,
		setSelectedBlockSlots,
		setSelectedFreeSlots,
		setSelectedResourceCells,
		setTransitioningToDay
	]);
}
//#endregion
exports.useBookingCalendarGoToDayFromCell = useBookingCalendarGoToDayFromCell;
