/** * 预约看板日历槽:视口合并、预约条渲染、锁台/改期、加载态与 RecordBoard 日历 props。 */ import React from 'react'; import type { RecordBoardCalendarBookingLike, RecordBoardCalendarProps, RecordBoardCalendarResource, ReservationScheduleBandValue, TimeRangeOption } from '@pisell/materials'; import type { SalesGridRuntimeContext } from '../../pisellSalesGrid/types'; import type { PisellReservationTableRow } from '../types'; export interface UseReservationCalendarSlotParams { isInternalListData: boolean; floorDayBookingData: { patchSearchParams: (fn: (prev: Record) => Record) => void; loading: boolean; }; operatingDayBoundary: unknown; tables: PisellReservationTableRow[]; openBookingDetailFromRaw: (args: { raw: Record; row: PisellReservationTableRow | undefined; }) => void; schedule: ReservationScheduleBandValue; handleScheduleChange: (next: ReservationScheduleBandValue) => void; calendarResources: RecordBoardCalendarResource[]; calendarBookings: RecordBoardCalendarBookingLike[]; effectiveTimelineRange: TimeRangeOption; runtimeContext: SalesGridRuntimeContext; /** * 日历首次上报视口(即第一次调用到 `handleCalendarViewportChange` 且 `isInternalListData=true`)后 * 触发一次。外层用它把 `floorDayBookingData` 的 `enabled` 在日历视图下从 false 翻成 true, * 避免「mount 时用默认 monitor 单日窗口先发一次、视口上报后再发一次整周」造成的重复请求。 */ onCalendarViewportFirstPatch?: () => void; } export interface UseReservationCalendarSlotResult { reservationCalendarSlotProps: RecordBoardCalendarProps; calendarGranularity: 'resource' | 'day' | 'week' | 'month'; setCalendarGranularity: React.Dispatch>; } export declare function useReservationCalendarSlot(p: UseReservationCalendarSlotParams): UseReservationCalendarSlotResult;