import { type ReactNode } from 'react'; import type { CalendarEditorCapabilities, CalendarRow, EditorPrefill, RecurrenceFrequency } from './calendar.model'; import { type RecurringScope } from './calendar-workspace.model'; /** The host's recurring occurrence. Rows never carry `CalendarRow.series` * for such a host: the scope question is asked from this snapshot. */ export interface CalendarEditorSeries { /** The occurrence being edited, as a local Date on the host's wall clock. */ occurrence: Date; /** Scopes the host can honour, in display order. Non-empty; the kit * renders exactly this list and never adds a scope. */ scopes: readonly RecurringScope[]; /** Merged over snapshot.capabilities once a scope is chosen. */ capabilitiesByScope?: Partial>; /** Offer the care-plan clean-up question in the delete dialog. */ offersCarePlanCleanup?: boolean; /** Reserved for summary lines; the editor does not require it. */ summary?: { frequency?: RecurrenceFrequency; index?: number; total?: number; }; } export type CalendarAppointmentEditorSnapshot = { status: 'ready'; prefill: EditorPrefill & { editEventId: string; date: Date; time: { hours: number; minutes: number; }; durationMin: number; }; capabilities?: CalendarEditorCapabilities; series?: CalendarEditorSeries; } | { status: 'refused'; reason: string; retryable?: boolean; }; export type CalendarAppointmentEditorLoader = (eventId: string, options: { signal: AbortSignal; }) => Promise; type ReadySnapshot = Extract; export declare function CalendarEditorHydration({ eventId, load, onCancel, children, }: { eventId?: string; load?: CalendarAppointmentEditorLoader; /** Return to the host while loading or when the editor read fails. */ onCancel?: () => void; children: (snapshot?: ReadySnapshot) => ReactNode; }): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined; /** Display-only projection. It never reaches journey.setRows. */ export declare function rowWithCanonicalEditor(row: CalendarRow, snapshot: ReadySnapshot, patientName: string): CalendarRow; export {}; //# sourceMappingURL=calendar-editor-hydration.d.ts.map