import type { AppointmentDetailsRead, AppointmentDetailsState, UseAppointmentDetailsReadOptions } from './appointment-details-panel.types'; export interface AppointmentDetailsReadResult { /** Pass as AppointmentDetailsPanel `state`. Null while `eventId` is null: * there is no selection, so render no panel. */ state: AppointmentDetailsState | null; /** Pass as AppointmentDetailsPanel `onRetry`: reads the same occurrence * again. */ retry: () => void; } /** * Reads one occurrence so that the latest selection always wins. A new * `eventId` aborts the read in flight and shows the skeleton, even for an * id shown before; a late answer for an earlier request is dropped. The * error and refused states carry the `eventId` they answer. An answer for * another appointment, or with an unreadable `startIso`, becomes an error, * so the panel never shows one patient's name with another's appointment. * A new `reloadKey` reads * the same occurrence again while the current read stays on screen * (`refreshing`); if that read fails, the panel shows the error rather than * going back to the older read. A null `eventId` reads nothing and returns * a null `state`. * * The latest `load` is the one called, so an inline loader never loops: * only `eventId`, `reloadKey` and `retry` start a read. */ export declare function useAppointmentDetailsRead(options: UseAppointmentDetailsReadOptions & { eventId: string; }): AppointmentDetailsReadResult & { state: AppointmentDetailsState; }; export declare function useAppointmentDetailsRead(options: UseAppointmentDetailsReadOptions): AppointmentDetailsReadResult; //# sourceMappingURL=use-appointment-details-read.d.ts.map