import { JSX, ReactNode } from 'react'; import { TimeScaleProps, WorkHoursProps, SchedulerCellProps } from '../types/scheduler-types'; import { TimelineSlot } from '../types/internal-interface'; /** * Interface for the props accepted by useWorkCells hook */ interface UseWorkCellsProps { /** * The dates to render */ renderDates: Date[]; /** * The work days configuration */ workDays: number[]; /** * The work hours configuration */ workHours: WorkHoursProps; /** * The custom template for cells */ cell?: (props: SchedulerCellProps) => ReactNode; /** * The time scale configuration */ timeScale: TimeScaleProps; /** * The start hour of the scheduler */ startHour: string; /** * The end hour of the scheduler */ endHour: string; /** * Whether it is a timeline view */ isTimelineView?: boolean; /** * The time slots for timeline view */ timeSlots?: TimelineSlot[]; /** * Whether it is a month view */ isMonthView?: boolean; } /** * Interface for a work cell * * @private */ export interface WorkCell { /** * The date for this cell */ date: Date; /** * CSS class names for the cell */ className: string; /** * Unique key for React rendering */ key: string; /** * Data attributes for the cell */ dataAttributes: { date: number; dateKey?: string; groupIndex?: number; }; /** * Whether this cell is part of work hours */ isWorkHour?: boolean; /** * Whether this date is today */ isToday: boolean; /** * Whether this date is a weekend */ isWeekend: boolean; /** * Whether this is an alternate cell */ isAlternate?: boolean; /** * Resource group index (sequential position among leaf resources) */ groupIndex?: number; /** * Horizontal column span in adaptive date/slot units (last-level grain). * Week/Month/Year last-track cells use this so one work cell fills the * full spanned width via `--sf-scheduler-col-span`. */ colSpan?: number; /** * End date for cells that span a range (e.g. Week/Month/Year last-track header groups). */ endDate?: Date; } /** * Interface for the result of useWorkCells hook */ interface UseWorkCellsResult { /** * Processed work cell rows */ workCellRows: { key: string; dataAttribute?: string; cells: WorkCell[]; }[]; /** * Function to render the cell template */ renderCellTemplate: (date: Date) => JSX.Element | null; } /** * Custom hook to process work cells and provide related functionalities * * @param {UseWorkCellsProps} props - The props for work cells * @returns {UseWorkCellsResult} Processed cells data and related functions * @private */ export declare const useWorkCells: (props: UseWorkCellsProps) => UseWorkCellsResult; export default useWorkCells;