import type { KoineCalendarDaygridNavProps } from "./CalendarDaygridNav"; import type { KoineCalendarDaygridTableProps } from "./CalendarDaygridTable"; import type { KoineCalendarLegendProps } from "./CalendarLegend"; import type { CalendarEvent, CalendarEventsMap, CalendarView, Calendars } from "./types"; export type UseCalendarProps = { /** The locale to format with `date-fns` */ locale: string; /** Calendars infos to use */ calendars: Calendars; /** Fall back to `process.env.GOOGLE_CALENDAR_API_KEY */ apiKey?: string; /** The key is the event `uid` */ events?: CalendarEventsMap; /** It defaults to the first of the current month */ start?: Date; /** It defaults to the last day of the current month */ end?: Date; /** * The calendar view * @default "month" */ view?: CalendarView; /** * The default is the time zone of the calendar * @see https://developers.google.com/calendar/api/v3/reference/events/list */ timeZone?: string; onError?: (e: any) => void; }; export type UseCalendarReturn = ReturnType; export type CalendarsUpdateActionEvents = { type: "events"; payload: Record; }; export type CalendarsUpdateActionVisibility = { type: "visibility"; payload: string | string[]; }; export type CalendarsUpdateAction = CalendarsUpdateActionEvents | CalendarsUpdateActionVisibility; export declare let useCalendar: ({ locale, apiKey, calendars, events: initialEvents, start: initialStart, end: initialEnd, view: initialView, timeZone, onError, }: UseCalendarProps) => { view: "month" | "week"; eventClicked: CalendarEvent | null; setEventClicked: import("react").Dispatch>; eventHovered: CalendarEvent | null; setEventHovered: import("react").Dispatch>; getDaygridNavProps: () => KoineCalendarDaygridNavProps; getDaygridTableProps: () => KoineCalendarDaygridTableProps; getLegendProps: () => KoineCalendarLegendProps; };