import { type Ref } from 'vue'; import { type Timestamp } from '@timestamp-js/core'; import { type CalendarScopeData } from '../utils/calendarSystem'; import { type CommonProps } from './useCommon'; import { type ColumnProps } from './useColumn'; import { type CellWidthProps } from './useCellWidth'; import { type MaxDaysProps } from './useMaxDays'; export interface Scope { scope: any; } export interface ScopeForSlot extends CalendarScopeData { /** Timestamp represented by the slot. */ timestamp: Timestamp; /** Helper that returns the vertical start position for a time. */ timeStartPos: (_time: string, _clamp?: boolean) => number | false; /** Helper that returns the vertical height for a duration. */ timeDurationHeight: (_minutes: number) => number; /** Zero-based rendered column index. */ columnIndex?: number; /** Whether the timestamp is the active date. */ activeDate?: boolean; /** Whether the slot content is disabled. */ disabled?: boolean; /** Whether the timestamp is outside the active month. */ outside?: boolean; /** Whether weekday labels are rendered in short form. */ shortWeekdayLabel?: boolean; /** Whether the slot can accept dropped content. */ droppable?: boolean; } export interface CalendarDaysProps extends CommonProps, ColumnProps, CellWidthProps, MaxDaysProps { } export interface UseCalendarDaysReturn { days: Ref; parsedCellWidth: Ref; styleDefault: (_scope: Scope) => {}; getScopeForSlot: (_day: Timestamp, _columnIndex?: number) => ScopeForSlot; } export default function useCalendarDays(props: CalendarDaysProps, { times, parsedStart, parsedEnd, activeDate, maxDays, size, headerColumnRef, }: { times: { today: Timestamp; }; parsedStart: Ref; parsedEnd: Ref; activeDate?: Ref; maxDays: Ref; size: { width: number; }; headerColumnRef: Ref; }): UseCalendarDaysReturn;