import { type ReactNode } from 'react'; import '../../tokens/themes/bridges/fullcalendar-theme.css'; export type CalendarView = 'dayGridMonth' | 'timeGridWeek' | 'timeGridThreeDays' | 'timeGridDay' | 'listWeek' | 'resourceTimeGridDayChair' | 'resourceTimeGridThreeDaysChair' | 'resourceTimeGridWeekChair' | 'resourceTimeGridDayOperator' | 'resourceTimeGridThreeDaysOperator' | 'resourceTimeGridWeekOperator'; /** * Maps a public `CalendarView` name to the internal FullCalendar view * name. `resourceLayout` selects between `resourceTimeGrid*` (vertical) * and `resourceTimeline*` (horizontal) for the 6 resource views. The * 4 standard views resolve as-is under `vertical`; under `horizontal`, * `timeGridDay` / `timeGridWeek` resolve to the plain `timelineDay` / * `timelineWeek` timelines (platform calendarResourceView parity), while * `dayGridMonth` / `listWeek` are orientation-free and pass through. */ export declare function resolveFullCalendarView(view: CalendarView, resourceLayout?: 'vertical' | 'horizontal'): string; export type CalendarEventStatus = 'confirmed' | 'waiting' | 'in_care' | 'done' | 'cancelled' | 'absent'; export type CalendarMode = 'default' | 'create' | 'move' | 'copy'; export interface CalendarEvent { id: string; title: string; /** * Short identity for sliver cards: the patient's surname. Never rendered * in privacy mode. Not the same field as `CalendarResource.shortTitle`, * which is a resource's initials. */ shortTitle?: string; /** Opposite resource axis label, displayed on tall cards. */ contextLabel?: string; /** * The full name behind `contextLabel`, read by screen readers instead of * it. Set it when the visible label is an abbreviation, such as an * operator's initials, so the card is not announced letter by letter. */ contextName?: string; start: string | Date; end?: string | Date; resourceId?: string; allDay?: boolean; status?: CalendarEventStatus; /** Hex colour from the consumer's colour picker — paints the card surface. */ backgroundColor?: string; /** Hex colour paired with `backgroundColor` — paints the card text. */ textColor?: string; /** * Optional hex border for light backgrounds. The platform emits * '#cccccc' when backgroundColor is '#ffffff' and omits it otherwise. * Pass together with backgroundColor. */ borderColor?: string; /** Extra description rendered after the title in normal weight. */ suffix?: string; /** Masked title shown when `privacyMode` is true. */ privacyModeTitle?: string; /** Shows a Globe icon + zebra overlay. */ isBookedOnline?: boolean; /** Shows an AlertTriangle icon. */ hasUnassignedPatient?: boolean; /** Shows a HeartPulse icon. */ hasHighlightedAnamnesis?: boolean; /** Shows a Euro icon. */ hasBillableAmount?: boolean; /** Shows a Video icon. */ isTelehealth?: boolean; /** * Shows a Repeat icon — this event belongs to a repeating series. Set * it on EVERY occurrence: it answers "does moving or deleting this * touch other appointments?", which holds for a modified occurrence * too. Distinct from `isRecurrenceParent`, which is the series ROLE. */ isRecurring?: boolean; /** * Series ROLE — this row owns the recurrence rule (the others are * generated from it, or are overrides of one occurrence). Carried * through `onEventClick` so a consumer can branch its * this / this-and-following / all dialog on it. Renders nothing on its * own: use `isRecurring` for the grid indicator. */ isRecurrenceParent?: boolean; /** Background event; interactive only with onBackgroundEventClick. */ isInternal?: boolean; /** * Renders the card as a TASK rather than an appointment — calendar-scheduled * to-dos get their own treatment: dashed outline, muted default surface * (explicit `backgroundColor`/`textColor` still win), a leading clipboard * glyph, and a localised "task" word in the accessible name. Emitted as * `data-kind="task"` on the card for DOM hooks. */ isTask?: boolean; /** * Draft placeholder — an appointment being COMPOSED, not yet saved. * Renders with the card's dashed primary-tinted draft treatment * (`data-kind="draft"`) and is inert: no click, no hover callback, and * never draggable, so a mirrored slot cannot be mistaken for a booking * or dragged around. Use it to show which slot an open editor is * filling. */ isDraft?: boolean; /** * A REAL booked appointment whose details the host is still fetching — * an occupancy-first host draws the block from the slot it occupies * (colour, time, chair) and fills the name in afterwards. Renders the * card's details-pending treatment (`data-kind="pending-details"`). A * click is delivered and the host decides what it opens; the hover * callback and drag stay refused, so a block nobody can name yet is never * previewed or moved. Distinct from the pattern's `isPendingBooking` (an * online booking still missing a patient or an operator). */ detailsPending?: boolean; /** * Per-event master switch for drag AND resize. Overrides the * calendar-level `editable` for this event only (true enables even when * the calendar is not editable; false disables both gestures). * Leave undefined to inherit the calendar-level setting. * Precedence: per-event `startEditable` > per-event `editable` > * calendar-level `editable`. Background and details-pending events * are never draggable regardless. */ editable?: boolean; /** * Per-event drag (start-time) editability. `false` pins the event in * place while the rest of the calendar stays draggable — the platform's * closed-day / holiday / operator-absence all-day events use exactly * this. Does not affect resize. Leave undefined to inherit. */ startEditable?: boolean; patientId?: string | number; operatorId?: string | number; /** * Distinct chair x operator combinations behind a background * availability cell (`isInternal`) — read into the cell's tooltip and * accessible name, never rendered as a visible chip on the cell itself. */ optionCount?: number; } export interface CalendarResource { id: string; title: string; /** Short code a chip column header shows while `title` does not fit. * The platform sends a chair's name cut to two letters and an * operator's `getNameInitials()`. A code that two resources share, or * none, gives way to an abbreviation of `title` ("Poltrona 12" → "P12"). * The Avatar (initials) treatment ignores it. */ shortTitle?: string; /** Hex colour for the dot (text variant) / ResourceChip glyph circle. */ color?: string; /** @deprecated Unused — the Avatar derives its own accessible ink. */ shortTitleTextColor?: string; /** * Person photo for the Avatar treatment (`showResourceInitials`). Falls * back to the deterministic initials circle when omitted. */ avatarSrc?: string; /** Numeric ordering — passed to FullCalendar's `resourceOrder`. */ sequenceNumber?: number; /** * ISO local dates ('YYYY-MM-DD') on which this resource's column is * hidden in VERTICAL resource views — visible Monday, hidden Tuesday, * within one multi-day view (the platform's show-only-available- * operators feature: `operatorDatesToHide` maps here 1:1). The column * (header cell, all-day cell, timed body column) is removed from * layout, hit-testing, and the accessibility tree for those dates * only; remaining columns share the freed width, and the date-header * cell's span is adjusted internally. When EVERY resource hides a * date, the whole date column collapses. Omitted / empty = always * visible — an available-but-empty resource keeps its column simply * by being in `resources` (no dummy events needed). * * Scope: `resourceTimeGrid*` views with `datesAboveResources` (the * default) only. Documented no-op for `resourceLayout='horizontal'` * (a timeline row spans all dates — no per-date geometry; matches the * platform, where the feature is inert in timelines) and for * non-resource views. `hiddenDays` wins: entries on never-rendered * weekdays are silently ignored. * * Update this atomically with `events`/`resources` (one commit) — * the kit derives everything else, so there is no loading-flash * window to suppress. */ hiddenDates?: readonly string[]; } export interface CalendarEventDropInfo { event: CalendarEvent; oldStart: Date; newStart: Date; /** * Resource the event sat on before and after the drop, in resource * views. Read these for cross-column moves — `event.resourceId` comes * from `extendedProps`, which FullCalendar does NOT rewrite on a * resource change, so it still reports the ORIGINAL column. * Both are undefined in non-resource views. */ oldResourceId?: string; newResourceId?: string; /** * Restores FullCalendar's optimistic move — the platform's * confirm-modal pattern calls this on Cancel instead of committing. * Typed optional for backward compatibility of consumer-constructed * literals; the kit ALWAYS supplies it at runtime. * Lifetime: call at most once, and only BEFORE you replace the * `events` prop — once new event data re-parses, `revert()` refers to * a stale store and must not be called. */ revert?: () => void; } export interface CalendarEventResizeInfo { event: CalendarEvent; oldEnd: Date; newEnd: Date; /** Same contract as `CalendarEventDropInfo.revert`. */ revert?: () => void; } export interface CalendarDateSelectInfo { start: Date; end: Date; allDay: boolean; resourceId?: string; } /** * Payload for `onDatesSet` — fired whenever the visible date range changes: * initial mount, prev/next/today, `gotoDate`, `changeView`, and any option * change that re-windows the range (e.g. `hiddenDays`). Everything a * data-pipeline consumer needs (range-scoped refetch, slot re-windowing, * per-user view persistence, analytics) without touching FullCalendar types. */ export interface CalendarDatesSetInfo { /** * The public view name — echoes the `view` prop as currently rendered. * Caveat: if you switch views through the imperative handle * (`changeView`) without updating the `view` prop, this echo goes stale; * use `internalView` (always live) or `handle.getCurrentView()` instead. */ view: CalendarView; /** * The live internal FullCalendar view name (e.g. `'resourceTimeGridDay'`, * `'dayGridMonth'`). Always reflects what is actually rendered. Note the * Chair/Operator suffix of the public union does not exist here — both * map to the same internal view. */ internalView: string; /** Inclusive start of the visible range. */ start: Date; /** EXCLUSIVE end of the visible range (FullCalendar convention). */ end: Date; /** The calendar's current date anchor (`getDate()`), i.e. the focused day. */ currentDate: Date; /** * Localised human title of the range (e.g. "April 2026", or * "Wednesday, April 15, 2026" in day-level views). */ title: string; } /** * Payload for `onDateClick` — a SINGLE click on a date/slot, distinct * from the click-drag range selection delivered via `onDateSelect`. */ export interface CalendarDateClickInfo { /** * The clicked date-time. For all-day cells this is local midnight of * the clicked day. */ date: Date; /** True when the click landed on an all-day cell / whole-day slot. */ allDay: boolean; /** Resource id when the click landed inside a resource column/lane. */ resourceId?: string; } /** * DOM metadata delivered as the optional second argument of * `onEventClick` — the anchor surface for detail popovers. */ export interface CalendarEventClickMeta { /** * The event's rendered root element (FullCalendar's `a.fc-event` * harness). OWNED BY FULLCALENDAR: it is destroyed and re-created on * every re-render — range navigation, `events` prop changes, theme * repaints, polling refreshes. Do not hold it across renders. Anchor * a popover to it for the current render only, and re-anchor (or * close) on `onDatesSet` and whenever the `events` prop changes; to * re-find the element later use * `rootElement.querySelector('[data-event-id=""]')` or * `handle.focusEvent(id)`. */ el: HTMLElement; /** * The native event that triggered the click. Caveat: FullCalendar * types this `MouseEvent` but delivers the raw `KeyboardEvent` when * an event card is activated with Enter/Space — do not position by * `clientX`/`clientY`; anchor to `el` instead (always safe). */ jsEvent: MouseEvent; } export interface CalendarProps { /** * Stable identifier for this calendar instance. Used for the agent-readiness * `data-component-id` attribute and the agent registry. Required only when * the consuming app expects an MCP / agent integration to address this * specific calendar. */ id?: string; /** Events to render on the calendar. */ events: CalendarEvent[]; /** Resources for `resourceTimeline` view. */ resources?: CalendarResource[]; /** Active view. */ view?: CalendarView; /** Initial date (string or Date). */ initialDate?: string | Date; /** Date-formatting locale override. UI labels use the active i18next language. */ locale?: string; /** Fires when an event is dragged to a new slot. */ onEventDrop?: (info: CalendarEventDropInfo) => void; /** Fires when an event is resized. */ onEventResize?: (info: CalendarEventResizeInfo) => void; /** * Fires when an event drag gesture begins — before any drop/revert * decision. Mirror of `onEventResizeStart`. Use it to pause polling / * auto-refresh and dismiss anchored popovers while the user is dragging. * Caveat: the kit does not currently expose a "drag stopped" callback * (FullCalendar has one — `eventDragStop`, which fires even for drags * aborted with Escape or dropped on an invalid slot — it is just not * surfaced yet). A cancelled drag never reaches `onEventDrop`, so * consumers pausing auto-refresh here should also resume it from * `onDatesSet` / a timeout fallback, not only from `onEventDrop`. */ onEventDragStart?: () => void; /** Fires when an event resize gesture begins. */ onEventResizeStart?: () => void; /** * Fires when an event is clicked. The optional second argument exposes * the event's DOM element and the native mouse event for popover * anchoring — see `CalendarEventClickMeta` for the anchor-lifetime * caveat. Existing one-argument handlers keep working unchanged. */ onEventClick?: (event: CalendarEvent, meta?: CalendarEventClickMeta) => void; /** Opt in to keyboard-accessible titled background buttons. The anchor * follows CalendarEventClickMeta's lifetime rules; no booking is implied. */ onBackgroundEventClick?: (event: CalendarEvent, meta: CalendarEventClickMeta) => void; /** * Fires when the pointer enters an event's rendered surface — the anchor * seam for hover "peek" cards. Skipped for background events * (`isInternal`). The meta carries the same anchor-lifetime caveats as * `onEventClick` — see `CalendarEventClickMeta`. Pointer-only by nature: * pair any hover surface with a click/focus path (`onEventClick`) so the * same information stays reachable by keyboard. */ onEventMouseEnter?: (event: CalendarEvent, meta: CalendarEventClickMeta) => void; /** * Fires when the pointer leaves an event's rendered surface. Skipped for * background events, mirroring `onEventMouseEnter`. */ onEventMouseLeave?: (event: CalendarEvent) => void; /** Fires when the user click-drags a range to create a new event. */ onDateSelect?: (range: CalendarDateSelectInfo) => void; /** * Fires whenever the visible date range changes — on mount, on every * prev/next/today/gotoDate/changeView, and when options re-window the * range. This is the hook for range-scoped data fetching (fetch events * for [start, end) and abort the previous request), view persistence, * and analytics. Fires once on initial render. * * Caveat: FullCalendar can RE-FIRE this with an IDENTICAL range when a * parent re-render reaches its option diff (render-prop identities * churn). Key side effects on the range actually changing — e.g. compare * `start`/`end`/`internalView` against the last invocation — and never * feed each `currentDate` back into `initialDate` (a fresh Date identity * per echo loops the render). */ onDatesSet?: (info: CalendarDatesSetInfo) => void; /** * Fires on a single click on an empty date/slot (the platform's * "click to create appointment" entry point). Distinct from * `onDateSelect`, which fires for click-drag range selection. * Works in every view INCLUDING the all-day lane of vertical resource * views — FullCalendar's native `dateClick` does not fire there, so the * wrapper synthesizes the payload internally; consumers never need the * native-listener workaround the platform carries. */ onDateClick?: (info: CalendarDateClickInfo) => void; /** * Day-number nav links (FullCalendar `navLinks`). When set, every * daygrid day number renders as a keyboard-reachable control (Tab, * Enter / Space, click) that fires this handler instead of * FullCalendar's own day zoom — the host switches its view, so * a Month → Day drill-down needs no pointer. */ onNavLinkDayClick?: (date: Date, jsEvent: UIEvent) => void; /** Allow drag-drop rescheduling. */ editable?: boolean; /** * Allow resize gestures on events. Defaults to `editable`, and can only * NARROW it: with `editable={false}` this is ignored, because that prop * states the viewer has no edit permission. To make one event editable * inside a locked calendar, use the per-event `editable` flag. */ eventDurationEditable?: boolean; /** Allow click-drag to create. */ selectable?: boolean; /** * Paint a placeholder over the range as it is dragged, so the user sees the * appointment they are about to make rather than only the slot they started * from. FullCalendar's own default is off; the kit turns it on wherever * `selectable` is on, because a selection nobody can see is not a selection. */ selectMirror?: boolean; /** * Keep the highlight when the pointer goes elsewhere. FullCalendar clears a * selection on the next click anywhere, which is wrong when that click is * the host opening an editor for the very slot just chosen: the form fills * in and the grid forgets which slot it was about. Set false to hold it * until the host clears it. */ unselectAuto?: boolean; /** Height of the calendar. */ height?: number | string; /** Extra class names on the wrapper. */ className?: string; /** Mask patient titles — announces state changes via aria-live. */ privacyMode?: boolean; /** * Colour scheme for event cards. `'solid'` (default, platform parity) * paints the picker hex across the whole card with auto-derived ink; * `'tinted'` renders the chip-family scheme — the picker colour as a * SOLID BORDER over a light tint of itself, text on foreground tokens. * Forwarded to every `CalendarEventCard`; tasks keep their muted * treatment regardless. */ eventColorStyle?: 'solid' | 'tinted'; /** * Timed slot row height. `compact` is FullCalendar's own 1.5em, the row * height before this prop existed; `comfortable` is 2.5em, close to the * platform agenda. Both are em of the grid's text, and the grid scrolls * rather than squeezes. @default 'compact' */ slotDensity?: 'compact' | 'comfortable'; /** Interaction mode — renders a sticky banner when not `'default'`. */ mode?: CalendarMode; /** Override text for the mode banner. */ modeLabel?: string; /** Hex background colour for the mode banner (consuming-app supplied). */ modeBannerColor?: string; /** Hex text colour for the mode banner. */ modeBannerTextColor?: string; /** Cancel handler wired to the mode banner button. */ onModeCancel?: () => void; /** Optional alert banner rendered above the mode banner. */ alertBanner?: ReactNode; /** * Weekdays to hide entirely, in JavaScript day numbering: * 0 = Sunday … 6 = Saturday (e.g. `[0]` hides Sundays — the AlfaDocs * platform default for every practice user). NOTE: the platform stores * ISO day numbers (1 = Monday … 7 = Sunday) per user and converts to JS * numbering consumer-side (`Settings.php` does `$day % 7`) — this prop * takes the JS-numbered result only; the kit performs no conversion. * Omitted / empty array shows all seven days. */ hiddenDays?: number[]; /** * Local ISO `YYYY-MM-DD` dates whose rows the host has NOT finished * loading: every cell of such a day wears the loading wash and carries * `aria-busy`, and its date header gains a visually-hidden "still * loading" word, so a half-drawn day is never read as an empty one. A * date left out of the list is one the host says is fully loaded; an * omitted prop says every rendered day is. The workspace pattern * derives it from `CalendarData.dayLoadState`. */ loadingDates?: readonly string[]; /** Lower bound of the time axis (e.g. '07:00'). */ slotMinTime?: string; /** Upper bound of the time axis (e.g. '23:00'). */ slotMaxTime?: string; /** Slot duration (e.g. '00:15'). */ slotDuration?: string; /** * Granularity drag and resize SNAP to, independent of the visual slot * height (e.g. a 30-minute grid that still edits in 15-minute steps — * the convention in Google Calendar and Outlook). Defaults to * `slotDuration` when omitted, which is FullCalendar's own default. */ snapDuration?: string; /** When false, hides the inline time pill on events. */ showTime?: boolean; /** Place date headers above the resource axis. */ datesAboveResources?: boolean; /** Allow overlapping events in the same slot. */ slotEventOverlap?: boolean; /** * Keep date headers pinned during scroll. The kit overrides a host sheet * that clips `.fc-view` or its table, so the header, the list view's day * headings and the timeline's footer scrollbar still stick there. */ stickyHeaderDates?: boolean; /** Show a now-indicator line on time-grid views. */ nowIndicator?: boolean; /** Collapse overflow events into "+N more" links. */ dayMaxEvents?: boolean | number; /** * FullCalendar Scheduler premium license key. Required for the * `resourceTimeline` view. Defaults to `VITE_FULLCALENDAR_LICENSE_KEY` * from the environment; consumers can override per-instance. */ schedulerLicenseKey?: string; /** * Show the built-in toolbar. Default true. Pass false to hide it * entirely (e.g. when the consuming app renders its own * `` elsewhere on the page). */ toolbar?: boolean; /** * Extra controls rendered at the inline-end of the default toolbar — * commonly a view switcher, a privacy toggle, or an "add appointment" * button. Ignored when `toolbar` is false. */ toolbarEnd?: ReactNode; /** * Orientation for resource views. `vertical` (default) uses * `resourceTimeGrid` — resources as columns, time as rows. * `horizontal` uses `resourceTimeline` — resources as rows, time as columns. * Also applies to the plain `timeGridDay` / `timeGridWeek` views: * under `horizontal` they render as the plain `timelineDay` / * `timelineWeek` timelines (no resources), mirroring the platform's * per-user calendarResourceView='horizontal' setting. * `dayGridMonth` / `listWeek` are orientation-free. Timeline rendering * requires the Scheduler license (already covered by * `schedulerLicenseKey`). */ resourceLayout?: 'vertical' | 'horizontal'; /** * Marks the resource axis as PEOPLE (operators): each label renders the * kit `Avatar` primitive ONLY — the photo when `resource.avatarSrc` is * set, the deterministic initials circle otherwise — with the full name * on hover (Tooltip) and in the a11y tree. Requires a `TooltipProvider` * in the app/Storybook root (already standard). When false (default), * place labels render text with a coloured dot — or the `ResourceChip` * under `resourceLabelVariant="chip"`. */ showResourceInitials?: boolean; /** * Presentation of PLACE resource labels (chairs, rooms). `'text'` * (default) keeps the plain coloured-dot treatment; `'chip'` renders * the kit's `ResourceChip` primitive — the same chip display used * everywhere, with its own vertical variant under * `verticalResourceLabels`. People are never chips: a person axis * (`showResourceInitials`) always renders the Avatar-style initials * treatment, the kit's person primitive. */ resourceLabelVariant?: 'text' | 'chip'; /** * Rotate the per-resource column labels (chairs / operators) to * vertical, bottom-to-top text in resource time-grid COLUMN HEADERS. * Meant for the narrow columns of week × resource views, where a * horizontal label truncates after a few characters. No-op in the * timeline datagrid (its resource rows stay horizontal) and in * non-resource views. Long labels still ellipsise, capped by the * bridge sheet so the header row cannot grow unbounded. */ verticalResourceLabels?: boolean; /** * Id of the SELECTED event — the one whose details the host has open * (a docked rail panel, an inspector). The matching card gets a token * focus-ring outline (`calendar-event-selected` on the FC harness) so * users can see WHICH appointment they are acting on. `null`/omitted = * no selection. Purely visual — selection state lives with the host. */ selectedEventId?: string | null; /** * Availability projection — dims regular event cards so BACKGROUND * events (`isInternal: true`) read as the foreground layer. Made for * "show free slots in the calendar": the host supplies the free * ranges as background events and flips this on; booked cards fade, * free ranges glow (success tint via the theme bridge). The selected * event (`selectedEventId`) stays at full strength. */ availabilityMode?: boolean; /** * Width of the resource-name column ("resource area") in horizontal * timeline views. Any CSS dimension — the platform passes '14%'. * No-op in vertical and non-resource views (no resource area exists). * Defaults to FullCalendar's own 30%. */ resourceAreaWidth?: string | number; /** * Header label above the resource area of horizontal timeline views. * The reserved values 'chairs' and 'operators' render the kit's * localised strings (calendar.resourceLabel.*, all 18 locales — the * platform's hardcoded 'Poltrone'/'Operatori', localised). Any other * string renders verbatim: pass an app-translated string, never a raw * literal. No-op in vertical and non-resource views. Default: empty. */ resourceAreaHeader?: 'chairs' | 'operators' | (string & {}); /** * Assumed duration for events that have a `start` but no `end` — the * platform passes the per-user default appointment length here * (NewCalendar `defaultAppointmentDuration`). Two shapes: * - a FullCalendar duration string — `'00:30'` / `'00:30:00'`; * - a number of MINUTES (the shape the platform stores per user, * 1–1439). Numbers are converted internally to `{ minutes: n }` and * are NEVER forwarded raw — FullCalendar would misread a bare number * as milliseconds. * Omitted = FullCalendar's default of 1 hour. Affects rendered height / * span and drag/resize geometry of end-less timed events only; all-day * events use FullCalendar's separate 1-day default. */ defaultTimedEventDuration?: string | number; /** * Shade alternate time-slot rows in time-grid views — a per-user * readability aid (the platform's `showZebraRowsInCalendar` setting). * Token-based tint that adapts to all four themes. Applies to the * vertical `timeGrid*` / `resourceTimeGrid*` slot body only; no-op in * month, list, and timeline views (same surface the platform shades). * @default false */ zebraRows?: boolean; /** * Privacy / observability seam — NOT a styling hook. When set, the kit * stamps this class (space-separated classes allowed) on every * patient-bearing internal surface so session-replay / analytics * tooling can mask them in one move: time-slot lanes, event harnesses * (all views, including drag mirrors, the "+N more" popover, and * background events), the built-in toolbar's navigation buttons and * title, the mode-banner label, and the aria-live announcement region * (drop/resize/focus announcements carry patient titles). The * reference consumer passes PostHog's marker so session replay masks * the agenda: `maskClassName="ph-no-capture"`. Resource labels * (staff names, not patient data) and time-axis labels are * deliberately not stamped — matching the platform. Consumer-provided * slots (`alertBanner`, `toolbarEnd`) are not stamped either — the kit * cannot reach inside arbitrary JSX, so stamp your own node if its * content can carry patient data. Trade-off: markers like * `ph-no-capture` suppress analytics autocapture as well as replay on * stamped elements (toolbar navigation clicks included) — instrument * such interactions explicitly if you need them in analytics. */ maskClassName?: string; } export interface CalendarHandle { /** Returns the internal FullCalendar instance for advanced use. */ getApi: () => unknown; /** Jump to today. */ today: () => void; /** Navigate to the previous period. */ prev: () => void; /** Navigate to the next period. */ next: () => void; /** Navigate to an arbitrary date. */ gotoDate: (date: Date | string) => void; /** Switch the active view. */ changeView: (view: CalendarView) => void; /** Current view title (e.g. "April 2026") — reflects the FC API getter. */ getTitle: () => string; /** Currently active view name. */ getCurrentView: () => CalendarView | undefined; /** Currently focused date — the anchor of the visible range. */ getCurrentDate: () => Date | undefined; /** Scroll to an event by id and briefly highlight it. */ focusEvent: (eventId: string) => void; } /** * Resolve the first day of the week for a locale using the modern * `Intl.Locale.getWeekInfo()` API when available, falling back to Monday * for EU-leaning locales and Sunday for en-US / he-IL / ar-SA. */ export declare function resolveFirstDay(locale: string): number; export interface PerDateHiding { /** `${resourceId}:${YYYY-MM-DD}` membership set (O(1) lookups — the * generators run at high volume during FC's sizing passes). */ hiddenCells: ReadonlySet; /** date → count of resources hidden on that date. */ hiddenCountByDate: ReadonlyMap; /** Column count per date when nothing is hidden. */ resourceCount: number; /** False when no resource carries hiddenDates OR datesAboveResources * is false — every hiding hook is an O(1) no-op then. */ active: boolean; } /** * Pure derivation of the per-date hiding lookups from the `resources` * prop — the kit-internal counterpart of the platform's server-computed * `operatorDatesToHide` / `datesToHide` / `dateColSpans` triple (the * latter two are derived here, never supplied). Exported for unit tests * (same precedent as `resolveFullCalendarView`). */ export declare function buildPerDateHiding(resources: readonly CalendarResource[] | undefined, datesAboveResources: boolean): PerDateHiding; export interface CalendarToolbarProps { /** Title shown in the toolbar (e.g. "April 2026"). Typically * produced by `calendarHandle.getTitle()`. */ title?: string; /** Jump to today. */ onToday: () => void; /** Navigate to the previous period. */ onPrev: () => void; /** Navigate to the next period. */ onNext: () => void; /** Extra controls rendered at the inline-end. */ end?: ReactNode; /** Additional className. */ className?: string; /** Same contract as `CalendarProps.maskClassName` — stamped on the * today/prev/next buttons and the title. */ maskClassName?: string; } export declare const CalendarToolbar: import("react").ForwardRefExoticComponent>; declare const CalendarInner: import("react").ForwardRefExoticComponent>; type CalendarComponent = typeof CalendarInner & { Toolbar: typeof CalendarToolbar; }; export declare const Calendar: CalendarComponent; export {}; //# sourceMappingURL=calendar.d.ts.map