import { type ReactNode } from 'react'; import { parseAppointmentStartIso, type AppointmentDetailsLoader, type AppointmentDetailsRead, type AppointmentDetailsSnapshot, type AppointmentDocumentKind } from '../../components/appointment-details-panel'; import type { CalendarEventStatus } from '../../components/calendar'; import type { PatientNotesSeam } from './calendar.sheets'; import type { CalendarHistoryEntry, CalendarPatient } from './calendar.types'; export type CalendarDocumentKind = AppointmentDocumentKind; /** One appointment occurrence as the host reads it for the details panel * (P-C2). An absent member renders nothing: never a zero, never an * empty-state claim. The read fields are AppointmentDetailsRead's; the * calendar adds its richer patient record and the host's actions. */ export interface CalendarAppointmentDetails extends Omit { /** Absent = no patient; `phones` carries every labelled number. */ patient?: CalendarPatient; history: CalendarHistoryEntry[]; /** Host-owned; the kit never sees the session code. */ onJoinTelehealth?: () => void; /** Host-composed; absent = not available. */ whatsappUrl?: string; /** Host-owned bridge to the practice's WhatsApp snippets; absent = not * offered. With `whatsappUrl` too, the one button calls this. */ onWhatsApp?: () => void; /** Server-built link to the task page, same tab; absent = not offered. */ createTaskUrl?: string; /** Host owns permissions and creation/navigation. Independent of appointment readOnly. */ documents?: { kinds: readonly CalendarDocumentKind[]; onCreate: (kind: CalendarDocumentKind) => void; }; } export type CalendarAppointmentDetailsSnapshot = AppointmentDetailsSnapshot; /** A rejected promise is a transient failure (error with Retry); 'refused' * means not visible (the reason, with Retry only when retryable). */ export type CalendarAppointmentDetailsLoader = AppointmentDetailsLoader; /** The host's zone-less wall clock as a local Date; see * `parseAppointmentStartIso`. */ export declare const parseDetailsStartIso: typeof parseAppointmentStartIso; export interface CalendarDetailsHydrationProps { /** The occurrence to read; a new id aborts the previous read. */ eventId: string; /** Keep it stable: a new function reads the occurrence again. */ load: CalendarAppointmentDetailsLoader; /** Mounted only with details whose eventId and startIso passed the checks. */ children: (details: CalendarAppointmentDetails) => ReactNode; } /** The details panel is not mounted until the host's read answers for this * occurrence. A late answer for a replaced id or loader is ignored. A new * `load` reads the same occurrence again while the current read stays on * screen, so a host re-reads after a change by handing a new loader. Until * the first answer the panel's own shell shows the skeleton, the error with * Retry, or the refusal. */ export declare function CalendarDetailsHydration({ eventId, load, children, }: CalendarDetailsHydrationProps): import("react/jsx-runtime").JSX.Element; export interface CalendarAppointmentDetailsPanelProps { /** The occurrence as the host read it (P-C2). */ details: CalendarAppointmentDetails; /** The row's patient id (N-C5); defaults to the read's patient. */ patientId?: string; /** The host's notes seam; without it, no notes card. */ notesSeam?: PatientNotesSeam; /** Route to the host's Notes tool, optionally addressed to one note. */ onOpenNotes?: (patientId: string, noteId?: string) => void; /** Withholds Edit, Move, Copy and the status change; Join, WhatsApp and * Create task are the host's. */ readOnly?: boolean; onEdit?: () => void; /** Arm a Move placement: the next slot click places the appointment. */ onMove?: () => void; onCopy?: (withTreatments: boolean) => void; /** Save a new status for this occurrence. Reject with a user-facing * Error and the control shows it and keeps the old status. Absent, the * status is shown read-only. */ onStatusChange?: (status: CalendarEventStatus) => Promise; /** Save a new description for this occurrence, as the pencil's sub-view * submits it. Reject with a user-facing Error and the sub-view stays open * with it. Absent, the description is read-only. */ onDescriptionChange?: (description: string) => Promise; /** The user's map-link setting (platform `showPatientAddressMapLink`). */ mapsLink?: boolean; /** In History, say "What changed was not recorded." under an edit that * carries no detail. Off by default. */ noteUnrecordedEdits?: boolean; /** Privacy mode, as on the grid and the hover peek: the identity is * masked, personal fields, chips, notes and free text are dropped, and * time, operator, chair, status and treatments stay. */ privacy?: boolean; /** The grid's mask for this appointment (`privacyModeTitle`); bullets * without one. Read only under `privacy`. */ privacyTitle?: string; locale?: string; } /** The appointment details panel of the calendar (P-C2, P-C3): the published * AppointmentDetailsPanel, fed from CalendarData and the calendar's read. * It docks in the rail, is no dialog and asks no series scope. */ export declare function CalendarAppointmentDetailsPanel({ details, patientId, notesSeam, onOpenNotes, readOnly, onEdit, onMove, onCopy, onStatusChange, onDescriptionChange, mapsLink, noteUnrecordedEdits, privacy, privacyTitle, locale, }: CalendarAppointmentDetailsPanelProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=calendar-appointment-details.d.ts.map