import type { AccessPolicyResource } from '@medplum/fhirtypes';
import { AddFavoriteParams } from '@medplum/core';
import { AddPharmacyResponse } from '@medplum/core';
import { addPreferredPharmacyToPatient } from '@medplum/core';
import type { Address } from '@medplum/fhirtypes';
import type { AddressFormatOptions } from '@medplum/core';
import type { AlertProps } from '@mantine/core';
import type { AnchorProps } from '@mantine/core';
import type { Annotation } from '@medplum/fhirtypes';
import type { AriaRole } from 'react';
import type { Attachment } from '@medplum/fhirtypes';
import type { AvatarProps } from '@mantine/core';
import type { BadgeProps } from '@mantine/core';
import type { BaseLoginRequest } from '@medplum/core';
import type { Bundle } from '@medplum/fhirtypes';
import type { ButtonProps } from '@mantine/core';
import type { ClientApplication } from '@medplum/fhirtypes';
import type { CodeableConcept } from '@medplum/fhirtypes';
import type { Coding } from '@medplum/fhirtypes';
import type { ComboboxItem } from '@mantine/core';
import type { ComboboxProps } from '@mantine/core';
import type { Communication } from '@medplum/fhirtypes';
import { Component } from 'react';
import type { ComponentType } from 'react';
import type { ContactDetail } from '@medplum/fhirtypes';
import type { ContactPoint } from '@medplum/fhirtypes';
import type { ContainerProps } from '@mantine/core';
import { Context } from 'react';
import { createPreferredPharmacyExtension } from '@medplum/core';
import type { CSSProperties } from 'react';
import type { DiagnosticReport } from '@medplum/fhirtypes';
import type { DocumentReference } from '@medplum/fhirtypes';
import type { ElementDefinitionBinding } from '@medplum/fhirtypes';
import type { ElementDefinitionType } from '@medplum/fhirtypes';
import type { ElementProps } from '@mantine/core';
import type { Encounter } from '@medplum/fhirtypes';
import type { ErrorInfo } from 'react';
import type { ExtendedInternalSchemaElement } from '@medplum/core';
import type { ExtractResource } from '@medplum/fhirtypes';
import type { Filter } from '@medplum/core';
import { ForwardRefExoticComponent } from 'react';
import { getPreferredPharmaciesFromPatient } from '@medplum/core';
import type { HumanName } from '@medplum/fhirtypes';
import type { HumanNameFormatOptions } from '@medplum/core';
import type { Identifier } from '@medplum/fhirtypes';
import type { InternalSchemaElement } from '@medplum/core';
import { isAddPharmacyResponse } from '@medplum/core';
import { isOrganizationArray } from '@medplum/core';
import type { JSX } from 'react';
import type { LoginAuthenticationResponse } from '@medplum/core';
import type { MantineColor } from '@mantine/core';
import type { MeasureReport } from '@medplum/fhirtypes';
import type { Media } from '@medplum/fhirtypes';
import type { Medication } from '@medplum/fhirtypes';
import type { MedicationCartClearRequest } from '@medplum/core';
import type { MedicationCartManageResponse } from '@medplum/core';
import type { MedicationCartRemoveRequest } from '@medplum/core';
import type { MedicationCheckoutRequest } from '@medplum/core';
import type { MedicationCheckoutResponse } from '@medplum/core';
import type { MedicationOrderRequest } from '@medplum/core';
import type { MedicationOrderResponse } from '@medplum/core';
import type { MedicationRequest } from '@medplum/fhirtypes';
import type { MedicationSearchParams } from '@medplum/core';
import type { MedplumClient } from '@medplum/core';
import { MemoExoticComponent } from 'react';
import type { Money } from '@medplum/fhirtypes';
import type { MouseEvent as MouseEvent_2 } from 'react';
import type { MouseEventHandler } from 'react';
import type { Observation } from '@medplum/fhirtypes';
import type { ObservationDefinition } from '@medplum/fhirtypes';
import type { ObservationDefinitionQualifiedInterval } from '@medplum/fhirtypes';
import type { OperationOutcome } from '@medplum/fhirtypes';
import type { OperationOutcomeIssue } from '@medplum/fhirtypes';
import { Operator } from '@medplum/core';
import type { OrderSetSyncResponse } from '@medplum/core';
import type { Organization } from '@medplum/fhirtypes';
import type { PaperProps } from '@mantine/core';
import type { PasswordInputProps } from '@mantine/core';
import type { Patient } from '@medplum/fhirtypes';
import { PATIENT_PREFERRED_PHARMACY_URL } from '@medplum/core';
import type { Period } from '@medplum/fhirtypes';
import { PHARMACY_PREFERENCE_TYPE_SYSTEM } from '@medplum/core';
import { PHARMACY_TYPE_PREFERRED } from '@medplum/core';
import { PHARMACY_TYPE_PRIMARY } from '@medplum/core';
import { PharmacySearchParams } from '@medplum/core';
import type { PlanDefinition } from '@medplum/fhirtypes';
import type { Practitioner } from '@medplum/fhirtypes';
import { PreferredPharmacy } from '@medplum/core';
import type { ProfileResource } from '@medplum/core';
import type { Quantity } from '@medplum/fhirtypes';
import type { QueryTypes } from '@medplum/core';
import type { Questionnaire } from '@medplum/fhirtypes';
import type { QuestionnaireItem } from '@medplum/fhirtypes';
import type { QuestionnaireItemAnswerOption } from '@medplum/fhirtypes';
import type { QuestionnaireItemEnableWhen } from '@medplum/fhirtypes';
import type { QuestionnaireItemInitial } from '@medplum/fhirtypes';
import type { QuestionnaireResponse } from '@medplum/fhirtypes';
import type { QuestionnaireResponseItem } from '@medplum/fhirtypes';
import type { QuestionnaireResponseItemAnswer } from '@medplum/fhirtypes';
import type { Range as Range_2 } from '@medplum/fhirtypes';
import type { Ratio } from '@medplum/fhirtypes';
import type { ReactNode } from 'react';
import { RefAttributes } from 'react';
import type { Reference } from '@medplum/fhirtypes';
import { removePreferredPharmacyFromPatient } from '@medplum/core';
import type { RequestGroup } from '@medplum/fhirtypes';
import type { Resource } from '@medplum/fhirtypes';
import type { ResourceArray } from '@medplum/core';
import type { ResourceModifiedEvent } from '@medplum/core';
import type { ResourceType } from '@medplum/fhirtypes';
import type { Schedule } from '@medplum/fhirtypes';
import type { SearchParameter } from '@medplum/fhirtypes';
import type { SearchRequest } from '@medplum/core';
import type { ServiceRequest } from '@medplum/fhirtypes';
import type { Signature } from '@medplum/fhirtypes';
import type { Slot } from '@medplum/fhirtypes';
import type { StructureDefinition } from '@medplum/fhirtypes';
import type { Subscription } from '@medplum/fhirtypes';
import type { SyntheticEvent } from 'react';
import type { TabsProps } from '@mantine/core';
import type { Task } from '@medplum/fhirtypes';
import type { TextProps } from '@mantine/core';
import type { Timing } from '@medplum/fhirtypes';
import type { TypedValue } from '@medplum/core';
import type { ValueSetExpandParams } from '@medplum/core';
import type { ValueSetExpansionContains } from '@medplum/fhirtypes';
import type { WithId } from '@medplum/core';

/**
 * Adds a filter for a date between two dates (inclusive of both dates).
 * @param definition - The original search request.
 * @param field - The field key name.
 * @param d1 - The start date.
 * @param d2 - The end date.
 * @returns The updated search request.
 */
export declare function addDateFilterBetween(definition: SearchRequest, field: string, d1: Date, d2: Date): SearchRequest;

export { AddFavoriteParams }

/**
 * Adds a field.
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addField(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter.
 * @param definition - The original search request.
 * @param field - The field key name.
 * @param op - The operation key name.
 * @param value - The filter value.
 * @param opt_clear - Optional flag to clear filters on the field.
 * @returns The updated search request.
 */
export declare function addFilter(definition: SearchRequest, field: string, op: Operator, value?: string, opt_clear?: boolean): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "last month".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addLastMonthFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "missing".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @param value - Optional boolean value. Default is true.
 * @returns The updated search request.
 */
export declare function addMissingFilter(definition: SearchRequest, field: string, value?: boolean): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "next 24 hours".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addNext24HoursFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "next month".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addNextMonthFilter(definition: SearchRequest, field: string): SearchRequest;

export { AddPharmacyResponse }

export { addPreferredPharmacyToPatient }

export declare function AddressDisplay(props: AddressDisplayProps): JSX.Element | null;

export declare interface AddressDisplayProps {
    readonly value?: Address;
    readonly options?: AddressFormatOptions;
}

export declare function AddressInput(props: AddressInputProps): JSX.Element;

export declare type AddressInputProps = ComplexTypeInputProps<Address>;

/**
 * Adds a filter that constrains the specified field to "this month".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addThisMonthFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "today".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addTodayFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "tomorrow".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addTomorrowFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to the year to date.
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addYearToDateFilter(definition: SearchRequest, field: string): SearchRequest;

/**
 * Adds a filter that constrains the specified field to "yesterday".
 * @param definition - The original search request.
 * @param field - The field key name.
 * @returns The updated search request.
 */
export declare function addYesterdayFilter(definition: SearchRequest, field: string): SearchRequest;

export declare function AIRealTimeQuestionnaireForm(props: AIRealTimeQuestionnaireFormProps): JSX.Element;

export declare interface AIRealTimeQuestionnaireFormProps extends QuestionnaireFormProps {
    readonly aiModel?: string;
    readonly onTranscript?: (fullTranscript: string, chunk: string) => void;
    readonly voiceInstructions?: ReactNode;
}

/** Allergies section — searches for AllergyIntolerance resources. */
export declare const AllergiesSection: PatientSummarySectionConfig;

export declare function AnnotationInput(props: AnnotationInputProps): JSX.Element;

export declare interface AnnotationInputProps extends ComplexTypeInputProps<Annotation> {
}

export declare function AppShell(props: AppShellProps): JSX.Element;

export declare interface AppShellAnnouncement {
    readonly id?: string;
    readonly message: ReactNode;
    readonly color?: MantineColor;
    readonly icon?: ReactNode;
    readonly dismissible?: boolean;
    readonly onDismiss?: (announcement: AppShellAnnouncement) => void;
    readonly role?: AriaRole;
}

export declare interface AppShellProps {
    readonly logo: ReactNode;
    readonly pathname?: string;
    readonly searchParams?: URLSearchParams;
    readonly headerSearchDisabled?: boolean;
    readonly version?: string;
    readonly menus?: NavbarMenu[];
    readonly children: ReactNode;
    readonly displayAddBookmark?: boolean;
    readonly resourceTypeSearchDisabled?: boolean;
    readonly notifications?: ReactNode;
    readonly announcements?: AppShellAnnouncement[];
    readonly layoutVersion?: 'v1' | 'v2';
    readonly showLayoutVersionToggle?: boolean;
    readonly spotlightPatientsOnly?: boolean;
}

export declare function AsyncAutocomplete<T>(props: AsyncAutocompleteProps<T>): JSX.Element;

export declare interface AsyncAutocompleteOption<T> extends ComboboxItem {
    readonly active?: boolean;
    readonly resource: T;
}

export declare interface AsyncAutocompleteProps<T> extends Omit<ComboboxProps, 'data' | 'defaultValue' | 'loadOptions' | 'onChange' | 'onCreate' | 'searchable'> {
    readonly name?: string;
    readonly label?: ReactNode;
    readonly description?: ReactNode;
    readonly error?: ReactNode;
    readonly defaultValue?: T | T[];
    readonly toOption: (item: T) => AsyncAutocompleteOption<T>;
    readonly loadOptions: (input: string, signal: AbortSignal) => Promise<T[]>;
    readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
    readonly pillComponent?: (props: {
        item: AsyncAutocompleteOption<T>;
        disabled?: boolean;
        onRemove: () => void;
    }) => JSX.Element;
    readonly emptyComponent?: (props: {
        search: string;
    }) => JSX.Element | ReactNode;
    readonly onChange: (item: T[]) => void;
    readonly onCreate?: (input: string) => T;
    readonly creatable?: boolean;
    readonly clearable?: boolean;
    readonly required?: boolean;
    readonly className?: string;
    readonly placeholder?: string;
    readonly leftSection?: ReactNode;
    readonly maxValues?: number;
    readonly optionsDropdownMaxHeight?: number;
    readonly minInputLength?: number;
}

export declare function AttachmentArrayDisplay(props: AttachmentArrayDisplayProps): JSX.Element;

export declare interface AttachmentArrayDisplayProps {
    readonly path?: string;
    readonly values?: Attachment[];
    readonly maxWidth?: number;
    readonly includeDescriptionListEntry?: boolean;
    readonly property?: InternalSchemaElement;
}

export declare function AttachmentArrayInput(props: AttachmentArrayInputProps): JSX.Element;

export declare interface AttachmentArrayInputProps {
    readonly name: string;
    readonly defaultValue?: Attachment[];
    readonly arrayElement?: boolean;
    readonly onChange?: (value: Attachment[]) => void;
    readonly disabled?: boolean;
}

export declare function AttachmentButton(props: AttachmentButtonProps): JSX.Element;

export declare interface AttachmentButtonProps {
    readonly securityContext?: Reference;
    readonly onUpload: (attachment: Attachment) => void;
    readonly onUploadStart?: () => void;
    readonly onUploadProgress?: (e: ProgressEvent) => void;
    readonly onUploadError?: (outcome: OperationOutcome) => void;
    children(props: {
        disabled?: boolean;
        onClick(e: MouseEvent_2): void;
    }): ReactNode;
    readonly disabled?: boolean;
}

export declare function AttachmentDisplay(props: AttachmentDisplayProps): JSX.Element | null;

export declare interface AttachmentDisplayProps {
    readonly value?: Attachment;
    readonly maxWidth?: number;
}

export declare function AttachmentInput(props: AttachmentInputProps): JSX.Element;

export declare interface AttachmentInputProps extends ComplexTypeInputProps<Attachment> {
    readonly arrayElement?: boolean;
    readonly securityContext?: Reference;
    readonly onChange?: (value: Attachment | undefined) => void;
}

export declare function BackboneElementDisplay(props: BackboneElementDisplayProps): JSX.Element | null;

export declare interface BackboneElementDisplayProps {
    readonly value: TypedValue;
    /** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
    readonly path: string;
    readonly compact?: boolean;
    readonly ignoreMissingValues?: boolean;
    readonly link?: boolean;
    /** (optional) Profile URL of the structure definition represented by the backbone element */
    readonly profileUrl?: string;
    /**
     * (optional) If provided, inputs specified in `accessPolicyResource.hiddenFields` are not shown.
     */
    readonly accessPolicyResource?: AccessPolicyResource;
}

export declare function BackboneElementInput(props: BackboneElementInputProps): JSX.Element;

export declare interface BackboneElementInputProps extends BaseInputProps {
    /** Type name the backbone element represents */
    readonly typeName: string;
    /** (optional) The contents of the resource represented by the backbone element */
    readonly defaultValue?: any;
    /** (optional) callback function that is called when the value of the backbone element changes */
    readonly onChange?: (value: any) => void;
    /** (optional) Profile URL of the structure definition represented by the backbone element */
    readonly profileUrl?: string;
    /**
     * (optional) If provided, inputs specified in `accessPolicyResource.readonlyFields` are not editable
     * and inputs specified in `accessPolicyResource.hiddenFields` are not shown.
     */
    readonly accessPolicyResource?: AccessPolicyResource;
}

/**
 * BaseChat component for displaying and managing communications.
 *
 * **NOTE: The component automatically filters `Communication` resources where the `sent` property is `undefined`.**
 *
 * @param props - The BaseChat React props.
 * @returns The BaseChat React node.
 */
export declare function BaseChat(props: BaseChatProps): JSX.Element | null;

export declare interface BaseChatProps extends PaperProps {
    readonly title: string;
    readonly communications: Communication[];
    readonly setCommunications: (communications: Communication[]) => void;
    readonly query: string;
    readonly sendMessage: (content: string, file?: File, existingDocRef?: DocumentReference) => void;
    readonly onMessageReceived?: (message: Communication) => void;
    readonly onMessageUpdated?: (message: Communication) => void;
    readonly inputDisabled?: boolean;
    readonly excludeHeader?: boolean;
    readonly onError?: (err: Error) => void;
    readonly uploadEnabled?: boolean;
    readonly attachmentSubjectRef?: Reference;
    readonly onViewInDocuments?: (reference: Reference<DocumentReference>) => void;
}

export declare interface BaseInputProps {
    /** The path identifying the related element definition and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
    readonly path: string;
    /** (optional) A FHIRPath expression that identifies the input more precisely than `path`, e.g. `Patient.identifier[0].system` versus `Patient.identifier.system` */
    readonly valuePath?: string;
    /** (optional) OperationOutcome from the last attempted system action*/
    readonly outcome?: OperationOutcome;
}

/**
 * A generic widget to choose an option by date/time. Renders a monthly
 * calendar UI and lets the viewer drill down into options on a given day.
 *
 * @param props - The React props
 * @returns the JSX Element
 */
export declare function BaseScheduler<T>(props: BaseSchedulerProps<T>): JSX.Element | null;

export declare interface BaseSchedulerProps<T> {
    /** A Reference or Resource to the actor being scheduled against (typically a Practitioner) */
    readonly actor?: Reference | Resource;
    /** A function that fetches SchedulingOption pairs. If this is not a stable function it can cause duplicate queries. */
    readonly fetchOptions: FetchOptionsFunction<T>;
    /** React nodes to render inside the scheduler container */
    readonly children?: React.ReactNode;
    /** A callback invoked when a specific option is selected */
    readonly onSelectOption?: (el: T, date: Date) => void;
}

/**
 * Returns a field display name.
 * @param key - The field key.
 * @returns The field display name.
 */
export declare function buildFieldNameString(key: string): string;

export declare function buildInitialResponse(questionnaire: Questionnaire, questionnaireResponse?: QuestionnaireResponse): QuestionnaireResponse;

export declare function buildInitialResponseItem(item: QuestionnaireItem): QuestionnaireResponseItem;

/**
 * Returns a display label for a search parameter code.
 *
 * Meta fields keep their underscore-prefixed code so they don't collide with same-named
 * elements (e.g. `ProjectMembership.project` vs `_project`).
 * @param code - The search parameter code.
 * @returns The display label for the search parameter.
 */
export declare function buildSearchParamFieldLabel(code: string): string;

export declare function CalendarDateInput(props: CalendarDateInputProps): JSX.Element;

export declare interface CalendarDateInputProps {
    readonly availableDates: Date[];
    readonly onChangeMonth: (date: Date) => void;
    readonly onClick: (date: Date) => void;
}

export declare function CalendarInput(props: CalendarInputProps): JSX.Element;

export declare interface CalendarInputProps {
    readonly slots: Slot[];
    readonly onChangeMonth: (date: Date) => void;
    readonly onClick: (date: Date) => void;
}

export declare function ChangePasswordForm(props: ChangePasswordFormProps): JSX.Element;

export declare interface ChangePasswordFormProps {
    readonly onSuccess?: () => void;
}

export declare interface ChatBubbleSkeletonProps {
    readonly alignment: 'left' | 'right';
    readonly parentWidth: number;
}

export declare function ChatModal(props: ChatModalProps): JSX.Element | null;

export declare interface ChatModalProps {
    readonly open?: boolean;
    readonly children: ReactNode;
}

export declare function CheckboxFormSection(props: CheckboxFormSectionProps): JSX.Element;

export declare interface CheckboxFormSectionProps {
    readonly htmlFor?: string;
    readonly title?: string;
    readonly description?: string;
    readonly withAsterisk?: boolean;
    readonly children?: ReactNode;
    readonly testId?: string;
    readonly fhirPath?: string;
    readonly readonly?: boolean;
}

export declare function ChooseScopeForm(props: ChooseScopeFormProps): JSX.Element;

export declare interface ChooseScopeFormProps {
    readonly login: string;
    readonly scope: string | undefined;
    readonly handleAuthResponse: (response: LoginAuthenticationResponse) => void;
    readonly title?: string;
    readonly submitLabel?: string;
    readonly logo?: ReactNode;
    readonly children?: ReactNode;
}

/**
 * Clears all of the filters.
 * @param definition - The original search request.
 * @returns The updated search request.
 */
export declare function clearFilters(definition: SearchRequest): SearchRequest;

/**
 * Clears all of the filters on a certain field.
 * @param definition - The original search request.
 * @param code - The field key name to clear filters.
 * @returns The updated search request.
 */
export declare function clearFiltersOnField(definition: SearchRequest, code: string): SearchRequest;

export declare function CodeableConceptDisplay(props: CodeableConceptDisplayProps): JSX.Element;

export declare interface CodeableConceptDisplayProps {
    readonly value?: CodeableConcept;
}

export declare function CodeableConceptInput(props: CodeableConceptInputProps): JSX.Element;

export declare interface CodeableConceptInputProps extends Omit<ValueSetAutocompleteProps, 'name' | 'defaultValue' | 'onChange' | 'disabled'>, ComplexTypeInputProps<CodeableConcept> {
    readonly onChange?: (value: CodeableConcept | undefined) => void;
}

export declare function CodeInput(props: CodeInputProps): JSX.Element;

export declare interface CodeInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange'> {
    readonly defaultValue?: string;
    readonly onChange: ((value: string | undefined) => void) | undefined;
}

export declare function CodingDisplay(props: CodingDisplayProps): JSX.Element;

export declare interface CodingDisplayProps {
    readonly value?: Coding;
    readonly includeCode?: boolean;
}

export declare function CodingInput(props: CodingInputProps): JSX.Element;

export declare interface CodingInputProps extends Omit<ValueSetAutocompleteProps, 'defaultValue' | 'onChange' | 'disabled' | 'name'>, ComplexTypeInputProps<Coding> {
    readonly response?: QuestionnaireResponseItem;
}

export declare function codingToValueSetElement(coding: Coding): ValueSetExpansionContains;

export declare type Command<T = string> = {
    command: string;
    value?: T;
};

/**
 * Compares two resources by meta.lastUpdated descending.
 * Resources without meta.lastUpdated sort after resources with meta.lastUpdated.
 * @param a - First resource.
 * @param b - Second resource.
 * @returns Comparator result for Array.sort().
 */
export declare function compareByLastUpdatedDescending(a: Resource, b: Resource): number;

export declare interface ComplexTypeInputProps<ValueType> extends BaseInputProps {
    readonly name: string;
    readonly defaultValue?: ValueType;
    readonly onChange?: (value: ValueType, propName?: string) => void;
    readonly disabled?: boolean;
}

export declare function ContactDetailDisplay(props: ContactDetailDisplayProps): JSX.Element | null;

export declare interface ContactDetailDisplayProps {
    readonly value?: ContactDetail;
}

export declare function ContactDetailInput(props: ContactDetailInputProps): JSX.Element;

export declare type ContactDetailInputProps = ComplexTypeInputProps<ContactDetail>;

export declare function ContactPointDisplay(props: ContactPointDisplayProps): JSX.Element | null;

export declare interface ContactPointDisplayProps {
    readonly value?: ContactPoint;
}

export declare function ContactPointInput(props: ContactPointInputProps): JSX.Element;

export declare type ContactPointInputProps = ComplexTypeInputProps<ContactPoint> & {
    readonly onChange?: (value: ContactPoint | undefined) => void;
};

export declare function Container(props: ContainerProps): JSX.Element;

/**
 * Converts an ISO-8601 date/time string to a local date/time string.
 * @param isoString - The ISO-8601 date/time string to convert.
 * @returns The local date/time string.
 */
export declare function convertIsoToLocal(isoString: string | undefined): string;

/**
 * Converts a local date/time string to an ISO-8601 date/time string.
 * @param localString - The local date/time string to convert.
 * @returns The ISO-8601 date/time string.
 */
export declare function convertLocalToIso(localString: string | undefined): string;

export declare function convertToPCM16(float32Array: Float32Array): Uint8Array;

/**
 * Labs section — searches for both ServiceRequest and DiagnosticReport resources.
 * Accepts an optional `onRequestLabs` callback via closure.
 * @param onRequestLabs - Optional callback invoked when the user requests labs.
 * @returns A section config for labs.
 */
export declare function createLabsSection(onRequestLabs?: () => void): PatientSummarySectionConfig;

/**
 * Pharmacies section — no FHIR searches; the Pharmacies component resolves its own data
 * from patient extensions.
 * Accepts an optional `pharmacyDialogComponent` via closure.
 * @param pharmacyDialogComponent - Optional component for the pharmacy search dialog.
 * @returns A section config for pharmacies.
 */
export declare function createPharmaciesSection(pharmacyDialogComponent?: ComponentType<PharmacyDialogBaseProps>): PatientSummarySectionConfig;

export { createPreferredPharmacyExtension }

/**
 * Dynamically creates a script tag for the specified JavaScript file.
 * @param src - The JavaScript file URL.
 * @param onload - Optional callback for the onload event.
 */
export declare function createScriptTag(src: string, onload?: () => void): void;

/**
 * The DateTimeInput component is a wrapper around the HTML5 input type="datetime-local".
 * The main purpose is to reconcile time zones.
 * Most of our date/time values are in ISO-8601, which includes a time zone offset.
 * The datetime-local input does not support the time zone offset.
 * @param props - The Input props.
 * @returns The JSX element to render.
 */
export declare function DateTimeInput(props: DateTimeInputProps): JSX.Element;

export declare interface DateTimeInputProps extends PrimitiveTypeInputProps {
    readonly label?: string;
    readonly placeholder?: string;
    readonly defaultValue?: string;
    readonly autoFocus?: boolean;
    readonly outcome?: OperationOutcome;
    readonly onChange?: (value: string) => void;
}

/**
 * Default item component for resource autocomplete inputs.
 * Displays the resource avatar, display name, and birth date or ID.
 */
export declare const DefaultResourceItemComponent: ForwardRefExoticComponent<AsyncAutocompleteOption<Resource> & RefAttributes<HTMLDivElement>>;

export declare function DefaultResourceTimeline(props: DefaultResourceTimelineProps): JSX.Element;

export declare interface DefaultResourceTimelineProps extends Pick<ResourceTimelineProps<Resource>, 'getMenu'> {
    readonly resource: Resource | Reference;
}

/**
 * Deletes a filter at the specified index.
 * @param definition - The original search request.
 * @param index - The filter index.
 * @returns The updated search request.
 */
export declare function deleteFilter(definition: SearchRequest, index: number): SearchRequest;

/** Demographics section — no FHIR searches, renders patient info items directly. */
export declare const DemographicsSection: PatientSummarySectionConfig;

export declare function DescriptionList(props: DescriptionListProps): JSX.Element;

export declare function DescriptionListEntry(props: DescriptionListEntryProps): JSX.Element;

export declare interface DescriptionListEntryProps {
    readonly term: string;
    readonly children: ReactNode;
}

export declare interface DescriptionListProps {
    readonly children: ReactNode;
    readonly compact?: boolean;
}

export declare function DiagnosticReportDisplay(props: DiagnosticReportDisplayProps): JSX.Element | null;

export declare namespace DiagnosticReportDisplay {
    var defaultProps: DiagnosticReportDisplayProps;
}

export declare interface DiagnosticReportDisplayProps {
    readonly value?: DiagnosticReport | Reference<DiagnosticReport>;
    readonly hideObservationNotes?: boolean;
    readonly hideSpecimenInfo?: boolean;
    readonly hideSubject?: boolean;
}

declare function Document_2(props: PanelProps): JSX.Element;
export { Document_2 as Document }

export declare function ElementDefinitionInputSelector(props: ElementDefinitionSelectorProps): JSX.Element;

export declare interface ElementDefinitionSelectorProps extends ResourcePropertyInputProps {
    readonly elementDefinitionTypes: ElementDefinitionType[];
}

export declare function ElementDefinitionTypeInput(props: ElementDefinitionTypeInputProps): JSX.Element;

export declare interface ElementDefinitionTypeInputProps extends Pick<ResourcePropertyInputProps, 'name' | 'path' | 'valuePath' | 'defaultValue' | 'onChange' | 'outcome'> {
    readonly elementDefinitionType: ElementDefinitionType;
    readonly min: number;
    readonly max: number;
    readonly binding: ElementDefinitionBinding | undefined;
    readonly readOnly?: boolean;
}

export declare function EncounterTimeline(props: EncounterTimelineProps): JSX.Element;

export declare interface EncounterTimelineProps extends Pick<ResourceTimelineProps<Encounter>, 'getMenu'> {
    readonly encounter: Encounter | Reference<Encounter>;
}

/**
 * ErrorBoundary is a React component that handles errors in its child components.
 * See: https://reactjs.org/docs/error-boundaries.html
 */
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
    readonly state: ErrorBoundaryState;
    constructor(props: ErrorBoundaryProps);
    static getDerivedStateFromError(error: Error): ErrorBoundaryState;
    componentDidUpdate(_prevProps: ErrorBoundaryProps, _prevState: ErrorBoundaryState): void;
    shouldComponentUpdate(nextProps: ErrorBoundaryProps, nextState: ErrorBoundaryState): boolean;
    componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
    render(): ReactNode;
}

export declare interface ErrorBoundaryProps {
    readonly children: ReactNode;
}

export declare interface ErrorBoundaryState {
    readonly error?: Error;
    readonly lastLocation: string;
}

/**
 * Evaluates the calculated expressions in a questionnaire.
 * Updates response item answers in place with the calculated values.
 *
 * See: https://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-calculatedExpression.html
 *
 * @param items - The questionnaire items to evaluate.
 * @param response - The questionnaire response to evaluate against.
 * @param responseItems - The response items to update.
 */
export declare function evaluateCalculatedExpressionsInQuestionnaire(items: QuestionnaireItem[], response: QuestionnaireResponse, responseItems?: QuestionnaireResponseItem[] | undefined): void;

/**
 * Creates a Blob object from the JSON object given and downloads the object.
 * @param jsonString - The JSON string.
 * @param fileName - Optional file name. Default is based on current timestamp.
 */
export declare function exportJsonFile(jsonString: string, fileName?: string): void;

export declare type FetchOptionsFunction<T> = (period: Period) => Promise<SchedulingOption<T>[]>;

/**
 * The FhirPathTable component represents the embeddable search table control.
 * @param props - FhirPathTable React props.
 * @returns FhirPathTable React node.
 */
export declare function FhirPathTable(props: FhirPathTableProps): JSX.Element;

export declare interface FhirPathTableField {
    readonly propertyType: string;
    readonly name: string;
    readonly fhirPath: string;
}

export declare interface FhirPathTableProps {
    readonly resourceType: string;
    readonly query: string;
    readonly fields: FhirPathTableField[];
    readonly checkboxesEnabled?: boolean;
    readonly onClick?: (e: SearchClickEvent) => void;
    readonly onAuxClick?: (e: SearchClickEvent) => void;
    readonly onBulk?: (ids: string[]) => void;
}

/** Descriptor for a single FHIR search that a section needs. */
export declare interface FhirSearchDescriptor {
    /** Unique key used to access this search's results via `SectionResults[key]`. */
    readonly key: string;
    readonly resourceType: ResourceType;
    /** Which search param references the patient. Defaults to 'subject'. Examples: 'patient', 'beneficiary'. */
    readonly patientParam?: string;
    /**
     * Additional search params — same format as the 2nd arg to medplum.searchResources().
     * When using a string, do not include _count or _sort; they are appended automatically.
     */
    readonly query?: QueryTypes;
}

export declare function Form(props: FormProps): JSX.Element;

export declare interface FormProps {
    readonly onSubmit?: (formData: Record<string, string>) => Promise<void> | void;
    readonly style?: CSSProperties;
    readonly children?: ReactNode;
    readonly testid?: string;
}

export declare function FormSection(props: FormSectionProps): JSX.Element;

export declare interface FormSectionProps {
    readonly title?: string;
    readonly htmlFor?: string;
    readonly description?: string;
    readonly withAsterisk?: boolean;
    readonly outcome?: OperationOutcome;
    readonly children?: ReactNode;
    readonly testId?: string;
    readonly fhirPath?: string;
    readonly errorExpression?: string;
    readonly readonly?: boolean;
}

/**
 * Returns the application name from environment variables or a default value.
 * @returns The application name.
 */
export declare function getAppName(): string;

/**
 * Returns the default set of sections, matching the original hardcoded PatientSummary layout.
 * The `onRequestLabs` callback is threaded through to the Labs section.
 * @param onRequestLabs - Optional callback invoked when the user requests labs.
 * @returns The default array of section configs.
 */
export declare function getDefaultSections(onRequestLabs?: () => void): PatientSummarySectionConfig[];

export declare function getErrorsForInput(outcome: OperationOutcome | undefined, expression: string | undefined): string | undefined;

/**
 * Returns the collection of field definitions for the search request.
 * @param search - The search request definition.
 * @returns An array of field definitions.
 */
export declare function getFieldDefinitions(search: SearchRequest): SearchControlField[];

export declare function getIssuesForExpression(outcome: OperationOutcome | undefined, expression: string | undefined): OperationOutcomeIssue[] | undefined;

export declare function getItemAnswerOptionValue(option: QuestionnaireItemAnswerOption): TypedValue;

export declare function getItemEnableWhenValueAnswer(enableWhen: QuestionnaireItemEnableWhen): TypedValue;

export declare function getItemInitialValue(initial: QuestionnaireItemInitial | undefined): TypedValue;

export declare function getNewMultiSelectValues(selected: string[], propertyName: string, item: QuestionnaireItem): QuestionnaireResponseItemAnswer[];

/**
 * Returns a string representing the operation.
 * @param op - The operation code.
 * @returns A display string for the operation.
 */
export declare function getOpString(op: Operator): string;

/**
 * Returns control properties for pagination controls.
 * This is specifically for the Mantine Pagination component.
 * See: https://v7.mantine.dev/core/pagination/?t=props
 * @param controlName - The name of the pagination control (e.g., 'previous', 'next').
 * @returns The properties for the pagination control.
 */
export declare function getPaginationControlProps(controlName: string): Record<string, string>;

export { getPreferredPharmaciesFromPatient }

/**
 * Returns the reference filter for the given questionnaire item.
 * @see https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-questionnaire-referenceFilter-definitions.html
 * @param item - The questionnaire item to get the reference filter for.
 * @param subject - Optional subject reference.
 * @param encounter - Optional encounter reference.
 * @returns The reference filter as a map of key/value pairs.
 */
export declare function getQuestionnaireItemReferenceFilter(item: QuestionnaireItem, subject: Reference | undefined, encounter: Reference<Encounter> | undefined): Record<string, string> | undefined;

export declare function getQuestionnaireItemReferenceTargetTypes(item: QuestionnaireItem): ResourceType[] | undefined;

/**
 * Starts a request to generate a recapcha token.
 * @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
 * @returns Promise to a recaptcha token for the current user.
 */
export declare function getRecaptcha(siteKey: string): Promise<string>;

export declare function getResponseItemAnswerValue(answer: QuestionnaireResponseItemAnswer): TypedValue | undefined;

/**
 * Returns a list of operators for a search parameter.
 * @param searchParam - The search parameter.
 * @returns The list of operators that can be used for the search parameter.
 */
export declare function getSearchOperators(searchParam: SearchParameter): Operator[] | undefined;

export declare function getSortField(definition: SearchRequest): string | undefined;

export declare function getValuePath(elementPath: string, valuePath: string | undefined, arrayIndex?: number): string;

export declare function Header(props: HeaderProps): JSX.Element;

export declare interface HeaderProps {
    readonly pathname?: string;
    readonly searchParams?: URLSearchParams;
    readonly headerSearchDisabled?: boolean;
    readonly logo: ReactNode;
    readonly version?: string;
    readonly navbarOpen?: boolean;
    readonly navbarToggle: () => void;
    readonly notifications?: ReactNode;
    readonly announcements?: AppShellAnnouncement[];
    readonly onDismissAnnouncement?: (announcement: AppShellAnnouncement) => void;
}

export declare type HeaderSearchTypes = Patient | ServiceRequest;

export declare function HumanNameDisplay(props: HumanNameDisplayProps): JSX.Element | null;

export declare interface HumanNameDisplayProps {
    readonly value?: HumanName;
    readonly options?: HumanNameFormatOptions;
}

export declare function HumanNameInput(props: HumanNameInputProps): JSX.Element;

export declare type HumanNameInputProps = ComplexTypeInputProps<HumanName>;

export declare function IdentifierDisplay(props: IdentifierDisplayProps): JSX.Element;

export declare interface IdentifierDisplayProps {
    readonly value?: Identifier;
}

export declare function IdentifierInput(props: IdentifierInputProps): JSX.Element;

export declare type IdentifierInputProps = ComplexTypeInputProps<Identifier>;

export declare function InfoBar(props: InfoBarProps): JSX.Element;

export declare namespace InfoBar {
    var Entry: (props: InfoBarEntryProps) => JSX.Element;
    var Key: (props: InfoBarKeyProps) => JSX.Element;
    var Value: (props: InfoBarValueProps) => JSX.Element;
}

export declare interface InfoBarEntryProps {
    readonly children: ReactNode;
}

export declare interface InfoBarKeyProps {
    readonly children: ReactNode;
}

export declare interface InfoBarProps {
    readonly children: ReactNode;
}

export declare interface InfoBarValueProps {
    readonly children: ReactNode;
}

/**
 * Dynamically loads the recaptcha script.
 * We do not want to load the script on page load unless the user needs it.
 * @param siteKey - The reCAPTCHA site key, available from the reCAPTCHA admin page.
 */
export declare function initRecaptcha(siteKey: string): void;

/** Insurance section — searches for Coverage resources. */
export declare const InsuranceSection: PatientSummarySectionConfig;

export declare type IntervalGroup = {
    id: string;
    filters: Record<string, any>;
    intervals: ObservationDefinitionQualifiedInterval[];
};

export { isAddPharmacyResponse }

/**
 * Returns true if the event is an auxiliary click.
 * @param e - The event.
 * @returns True if the event is an auxiliary click.
 */
export declare function isAuxClick(e: MouseEvent_2): boolean;

/**
 * Returns true if the element is a checkbox or a table cell containing a checkbox.
 * Table cells containing checkboxes are commonly accidentally clicked.
 * @param el - The HTML DOM element.
 * @returns True if the element is a checkbox or a table cell containing a checkbox.
 */
export declare function isCheckboxCell(el: Element): boolean;

/**
 * Returns true if the item is a choice question.
 * @param item - The questionnaire item to check.
 * @returns True if the item is a choice question, false otherwise.
 */
export declare function isChoiceQuestion(item: QuestionnaireItem): boolean;

/**
 * Returns true if the given search parameter code refers to a resource metadata field.
 * @param code - The search parameter code.
 * @returns True if the code is a meta search parameter.
 */
export declare function isMetaSearchParam(code: string): boolean;

export { isOrganizationArray }

/**
 * Returns true if the questionnaire item is enabled based on the enableWhen conditions or expression.
 * @param item - The questionnaire item to check.
 * @param questionnaireResponse - The questionnaire response to check against.
 * @returns True if the question is enabled, false otherwise.
 */
export declare function isQuestionEnabled(item: QuestionnaireItem, questionnaireResponse: QuestionnaireResponse | undefined): boolean;

export declare function isSortDescending(definition: SearchRequest): boolean;

export declare function isSupportedProfileStructureDefinition(profile?: StructureDefinition): profile is SupportedProfileStructureDefinition;

/**
 * Returns true if an error thrown while expanding a ValueSet means the value set itself is
 * unavailable — a permanent 400/404 (e.g. "ValueSet not found"). Transient failures (429 rate
 * limit, 401, 5xx, network) return false so a blip never disables a field.
 * @param err - The error thrown by `valueSetExpand`.
 * @returns True for a permanent 400/404, false for a transient failure.
 */
export declare function isValueSetUnavailableError(err: unknown): boolean;

/**
 * Kills a browser event.
 * Prevents default behavior.
 * Stops event propagation.
 * @param e - The event.
 */
export declare function killEvent(e: Event | SyntheticEvent): void;

/** Default Labs section constant (no onRequestLabs callback). */
export declare const LabsSection: PatientSummarySectionConfig;

export declare function LinkTabs(props: LinkTabsProps): JSX.Element;

export declare interface LinkTabsProps extends Omit<TabsProps, 'value' | 'onChange'> {
    readonly baseUrl: string;
    readonly tabs: string[] | TabDefinition[];
    readonly children?: React.ReactNode;
}

/**
 * ListWithDetailPane is a generic, presentational master-detail shell: a left sidebar
 * with optional pill tabs, header actions, a scrollable list, and pagination, plus a
 * detail area for the selected item. It does no data fetching or routing — it renders
 * what it is given and emits `onTabChange` / `onPageChange` callbacks.
 * @param props - The ListWithDetailPane React props.
 * @returns The ListWithDetailPane React node.
 */
export declare function ListWithDetailPane<T extends {
    id?: string;
} = Resource>(props: ListWithDetailPaneProps<T>): JSX.Element;

export declare interface ListWithDetailPaneDetailContext {
    readonly refresh: () => Promise<void>;
}

/** The sidebar header is plain text or pill tabs, never both. */
export declare type ListWithDetailPaneHeaderProps = ListWithDetailPaneTextHeaderProps | ListWithDetailPaneTabsHeaderProps;

export declare interface ListWithDetailPaneItemContext<T extends {
    id?: string;
} = Resource> {
    readonly selected: boolean;
    readonly index: number;
    readonly items: T[];
}

export declare type ListWithDetailPaneProps<T extends {
    id?: string;
} = Resource> = ListWithDetailPanePropsBase<T> & ListWithDetailPaneHeaderProps;

/** Props shared by every ListWithDetailPane, independent of the header style. */
export declare interface ListWithDetailPanePropsBase<T extends {
    id?: string;
} = Resource> {
    /** The current page of items to render in the list. */
    readonly items: T[];
    /** When true, the list area shows the skeleton instead of items. */
    readonly loading: boolean;
    /** Id of the highlighted row. */
    readonly selectedKey?: string;
    readonly renderItem: (item: T, ctx: ListWithDetailPaneItemContext<T>) => ReactNode;
    /** Shown when the list is empty. Default: dimmed "No items found". */
    readonly emptyList?: ReactNode;
    /** Shown while loading. Default: built-in skeleton rows. */
    readonly skeleton?: ReactNode;
    /** Sidebar width in pixels. Default 350. */
    readonly listWidth?: number;
    /** Right-aligned slot in the sidebar header row: action buttons, filter popovers. */
    readonly headerActions?: ReactNode;
    /** The resolved selected item, or undefined when nothing is selected. */
    readonly selected: T | undefined;
    readonly renderDetail: (selected: T, ctx: ListWithDetailPaneDetailContext) => ReactNode;
    /** Shown when nothing is selected. Default: dimmed prompt. */
    readonly emptyDetail?: ReactNode;
    /** Passed through to the detail render context. */
    readonly refresh: () => Promise<void>;
    /** Current 1-based page. Pagination is hidden unless this, `pageCount`, and `onPageChange` are set. */
    readonly page?: number;
    /** Total number of pages. Pagination is hidden when this is less than or equal to 1. */
    readonly pageCount?: number;
    /** Fired by the built-in pagination with the new 1-based page. */
    readonly onPageChange?: (page: number) => void;
}

export declare interface ListWithDetailPaneTab {
    readonly value: string;
    readonly label: ReactNode;
    readonly uri: string;
}

/**
 * Pill-tab header. Declares `headerText` as `never` so tabs can't be mixed with a title.
 */
export declare interface ListWithDetailPaneTabsHeaderProps {
    readonly tabs: ListWithDetailPaneTab[];
    readonly activeTab?: string;
    readonly onTabChange?: (value: string) => void;
    readonly headerText?: never;
}

/**
 * Plain-text header (or no header at all). Declares the tab fields as `never` so a title
 * can't be mixed with tabs.
 */
export declare interface ListWithDetailPaneTextHeaderProps {
    /** Plain title shown at the left of the header. */
    readonly headerText?: ReactNode;
    readonly tabs?: never;
    readonly activeTab?: never;
    readonly onTabChange?: never;
}

export declare function Loading(): JSX.Element;

export declare function Logo(props: LogoProps): JSX.Element;

export declare interface LogoProps {
    readonly size: number;
    readonly fill?: string;
}

export declare function MeasureReportDisplay(props: MeasureReportDisplayProps): JSX.Element | null;

export declare interface MeasureReportDisplayProps {
    readonly measureReport: MeasureReport | Reference<MeasureReport>;
}

/** Thrown by {@link UseMedicationCartReturn.checkout} when an {@link UseMedicationCartReturn.addToCart} call is still in flight. */
export declare const MEDICATION_CART_ADD_IN_PROGRESS = "Cannot checkout while a medication is still being added to the cart";

export declare interface MedicationIFrameOptions {
    readonly patientId?: string;
    /** Selected practice location for multi-practice deployments. */
    readonly organization?: Reference<Organization>;
    readonly onPatientSyncSuccess?: () => void;
    readonly onIframeSuccess?: (url: string) => void;
    readonly onError?: (err: unknown) => void;
}

/** Medications section — searches for MedicationRequest and MedicationStatement resources. */
export declare const MedicationsSection: PatientSummarySectionConfig;

export declare interface MedplumContext {
    medplum: MedplumClient;
    navigate: MedplumNavigateFunction;
    profile?: ProfileResource;
    loading: boolean;
}

export declare function MedplumLink(props: MedplumLinkProps): JSX.Element;

export declare interface MedplumLinkProps extends AnchorProps, ElementProps<'a', keyof AnchorProps> {
    readonly to?: Resource | Reference | string;
    readonly suffix?: string;
    readonly label?: string;
    readonly onClick?: MouseEventHandler;
    readonly children: ReactNode;
}

export declare type MedplumNavigateFunction = (path: string) => void;

/**
 * The MedplumProvider component provides Medplum context state.
 *
 * Medplum context includes:
 *   1) medplum - Medplum client library
 *   2) profile - The current user profile (if signed in)
 * @param props - The MedplumProvider React props.
 * @returns The MedplumProvider React node.
 */
export declare function MedplumProvider(props: MedplumProviderProps): JSX.Element;

export declare interface MedplumProviderProps {
    readonly medplum: MedplumClient;
    readonly navigate?: MedplumNavigateFunction;
    readonly children: ReactNode;
}

export declare const MemoizedFhirPathTable: MemoExoticComponent<typeof FhirPathTable>;

/**
 * Shared MFA enrollment UI used during sign-in and on the MFA settings page.
 * When the user is allowed to enroll in more than one method it leads with a
 * chooser; an email-only project shows a single "enable" prompt; otherwise it
 * shows the authenticator (TOTP) QR code. The chooser and email-only screens
 * are identical across contexts, while the TOTP step's wording is supplied by
 * the caller.
 * @param props - The MfaEnrollForm React props.
 * @returns The MfaEnrollForm React node.
 */
export declare function MfaEnrollForm(props: MfaEnrollFormProps): JSX.Element;

export declare interface MfaEnrollFormProps {
    /** The MFA methods the user is allowed to enroll in. */
    readonly allowedMethods: MfaMethod[];
    /** The TOTP QR code data URL, shown when enrolling an authenticator app. */
    readonly qrCodeUrl?: string;
    /** Enroll the email factor (the server emails a code on subsequent sign-ins). */
    readonly onEnrollEmail: () => void;
    /** Enroll the TOTP factor with the code from the user's authenticator app. */
    readonly onEnrollTotp: (token: string) => void | Promise<void>;
    /** Title for the authenticator (TOTP) QR enrollment step. */
    readonly totpTitle: string;
    /** Optional description shown alongside the TOTP QR code. */
    readonly totpDescription?: ReactNode;
    /** Submit button label for the TOTP step. */
    readonly totpButtonText?: string;
}

export declare function MfaForm(props: MfaFormProps): JSX.Element;

export declare type MfaFormFields = 'token';

export declare interface MfaFormProps {
    readonly title: string;
    readonly buttonText: string;
    readonly description?: ReactNode;
    readonly qrCodeUrl?: string;
    readonly onSubmit: (formData: Record<MfaFormFields, string>) => void | Promise<void>;
    /** Optional content rendered below the submit button (e.g. an alternate MFA method action). */
    readonly footer?: ReactNode;
}

/** An MFA factor a user can enroll in or verify with. */
export declare type MfaMethod = 'totp' | 'email';

/**
 * Shared MFA verification UI used during sign-in and when changing MFA
 * settings. It leads with the authenticator code and, when email is also an
 * available method, offers a "Get a code by email instead" action. Once in
 * email mode it shows the emailed-code entry with a "Resend code" action.
 * @param props - The MfaVerificationForm React props.
 * @returns The MfaVerificationForm React node.
 */
export declare function MfaVerificationForm(props: MfaVerificationFormProps): JSX.Element;

export declare interface MfaVerificationFormProps {
    /** The MFA methods the user can verify with. */
    readonly methods: MfaMethod[];
    /** The user's email, shown when entering an emailed code. */
    readonly email?: string;
    /**
     * Whether to start in email-code-entry mode. Use when email is the only
     * method (and a code has already been sent), so the user goes straight to
     * entering the code instead of an authenticator code.
     */
    readonly initialEmailMode?: boolean;
    /** Sends (or resends) a verification code to the user's email. */
    readonly onRequestEmailCode: () => void | Promise<void>;
    /** Called with the entered token (an authenticator code or an emailed code). */
    readonly onSubmit: (token: string) => void | Promise<void>;
    /** Optional override for the submit button label. */
    readonly buttonText?: string;
}

export declare function MoneyDisplay(props: MoneyDisplayProps): JSX.Element | null;

export declare interface MoneyDisplayProps {
    readonly value?: Money;
}

export declare function MoneyInput(props: MoneyInputProps): JSX.Element;

export declare interface MoneyInputProps extends ComplexTypeInputProps<Money> {
    readonly label?: string;
    readonly placeholder?: string;
}

export declare function MultiResourceInput<T extends Resource = Resource>(props: MultiResourceInputProps<T>): JSX.Element | null;

export declare interface MultiResourceInputProps<T extends Resource = Resource> {
    readonly resourceType: T['resourceType'];
    readonly name: string;
    /**
     * Initial selected values. Each entry may be a full resource or a reference that will be
     * resolved on mount. Treated as uncontrolled — changes after mount are ignored.
     */
    readonly defaultValue?: (T | Reference<T>)[];
    readonly searchCriteria?: Record<string, string>;
    readonly placeholder?: string;
    readonly required?: boolean;
    readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
    /** Called whenever the selection changes. Receives the full array of selected resources. */
    readonly onChange?: (value: T[]) => void;
    readonly disabled?: boolean;
    readonly label?: AsyncAutocompleteProps<T>['label'];
    readonly error?: AsyncAutocompleteProps<T>['error'];
    /** Maximum number of resources that can be selected. Defaults to uncapped. */
    readonly maxValues?: number;
}

export declare function Navbar(props: NavbarProps): JSX.Element;

export declare interface NavbarLink {
    readonly icon?: JSX.Element;
    readonly label?: string;
    readonly href: string;
    /** Static count to display. Ignored if notificationCount is provided. */
    readonly count?: number;
    /** If true, shows red alert styling (red dot on collapsed icon, red count text when expanded). */
    readonly alert?: boolean;
    /** Live subscription-based count. Overrides static `count` when provided. */
    readonly notificationCount?: {
        readonly resourceType: ResourceType;
        readonly countCriteria: string;
        readonly subscriptionCriteria: string;
    };
    /** Callback fired when the dismiss button is clicked. When provided, a dismiss (X) button appears on hover. */
    readonly onDismiss?: () => void;
}

export declare interface NavbarMenu {
    readonly title?: string;
    readonly links?: NavbarLink[];
}

export declare interface NavbarProps {
    readonly pathname?: string;
    readonly searchParams?: URLSearchParams;
    readonly logo?: ReactNode;
    readonly menus?: NavbarMenu[];
    readonly navbarToggle: () => void;
    readonly closeNavbar: () => void;
    readonly spotlightEnabled?: boolean;
    readonly patientsOnly?: boolean;
    readonly userMenuEnabled?: boolean;
    readonly displayAddBookmark?: boolean;
    readonly resourceTypeSearchDisabled?: boolean;
    readonly opened?: boolean;
    readonly version?: string;
    readonly showLayoutVersionToggle?: boolean;
}

export declare const NewTopicDialog: (props: NewTopicDialogProps) => JSX.Element;

/**
 * Props for the NewTopicDialog component.
 * @param subject - The patient to associate with the new thread. When provided and `allowPatientSelection` is false, the patient field is pre-filled and disabled.
 * @param opened - Whether the dialog is open.
 * @param onClose - Callback fired when the dialog is closed.
 * @param onSubmit - Callback fired with the created Communication resource after successful submission.
 * @param allowPatientSelection - When true, the patient field is an editable search input. When false (default), the field is pre-filled from `subject` and disabled. Use true for provider-facing contexts, false for patient-facing apps.
 */
export declare interface NewTopicDialogProps {
    subject: Reference<Patient> | Patient | undefined;
    opened: boolean;
    onClose: () => void;
    onSubmit?: (communication: Communication) => void;
    allowPatientSelection?: boolean;
}

export declare function NoteDisplay({ value }: NoteDisplayProps): JSX.Element | null;

export declare interface NoteDisplayProps {
    readonly value?: Annotation[];
}

export declare function NotificationIcon(props: NotificationIconProps): JSX.Element;

export declare interface NotificationIconProps {
    readonly iconComponent: JSX.Element;
    readonly label?: string;
    readonly tooltip?: string;
    readonly resourceType: ResourceType;
    readonly countCriteria: string;
    readonly subscriptionCriteria: string;
    readonly onClick?: () => void;
}

export declare function ObservationTable(props: ObservationTableProps): JSX.Element;

export declare interface ObservationTableProps {
    readonly value?: Observation[] | Reference<Observation>[];
    readonly ancestorIds?: string[];
    readonly hideObservationNotes?: boolean;
}

export declare function OperationOutcomeAlert(props: OperationOutcomeAlertProps): JSX.Element | null;

export declare interface OperationOutcomeAlertProps extends AlertProps {
    readonly outcome?: OperationOutcome;
    readonly issues?: OperationOutcomeIssue[];
    readonly displayOkOutcomes?: boolean;
}

export declare function Panel(props: PanelProps): JSX.Element;

export declare interface PanelProps extends PaperProps {
    readonly width?: number;
    readonly fill?: boolean;
    readonly children?: ReactNode;
}

/**
 * Parses an HTML form and returns the result as a JavaScript object.
 * @param form - The HTML form element.
 * @returns Form values in key value pairs.
 */
export declare function parseForm(form: HTMLFormElement): Record<string, string>;

export declare function ParticipantFilter(props: ParticipantFilterProps): JSX.Element;

export declare interface ParticipantFilterProps {
    readonly selectedParticipants: Reference<Patient | Practitioner>[];
    readonly onFilterChange: (participants: Reference<Patient | Practitioner>[]) => void;
}

/**
 * Mantine's `PasswordInput` sets `tabIndex={-1}` and `aria-hidden` on the visibility toggle button
 * unless `visibilityToggleButtonProps` is provided, which removes it from the keyboard tab order and
 * hides it from assistive technology. This wrapper defaults the toggle to be keyboard accessible.
 * @param props - The password input props.
 * @returns The password input component.
 */
export declare function PasswordInput(props: PasswordInputProps): JSX.Element;

export { PATIENT_PREFERRED_PHARMACY_URL }

export declare function PatientAccountsForm(props: PatientAccountsFormProps): JSX.Element;

export declare interface PatientAccountsFormProps {
    readonly patient: Patient;
    readonly onSaved?: () => void;
}

export declare function PatientExportForm(props: PatientExportFormProps): JSX.Element;

export declare interface PatientExportFormProps {
    readonly patient: Patient | Reference<Patient>;
}

export declare function PatientHeader(props: PatientHeaderProps): JSX.Element | null;

export declare interface PatientHeaderProps {
    readonly patient: Patient | Reference<Patient>;
}

export declare function PatientSummary(props: PatientSummaryProps): JSX.Element | null;

export declare interface PatientSummaryData {
    /** One SectionResults map per section, indexed to match the sections array. */
    readonly sectionData: SectionResults[];
    readonly loading: boolean;
    readonly error: Error | undefined;
}

export declare interface PatientSummaryProps {
    readonly patient: Patient | Reference<Patient>;
    readonly onClickResource?: (resource: Resource) => void;
    readonly onRequestLabs?: () => void;
    readonly sections?: PatientSummarySectionConfig[];
}

/**
 * Configuration for a single section in the PatientSummary.
 * The `searches` field is an array to support sections like Labs which need multiple resource types.
 */
export declare interface PatientSummarySectionConfig {
    readonly key: string;
    readonly title: string;
    readonly searches?: FhirSearchDescriptor[];
    /**
     * React component that renders this section.
     * Using ComponentType (rather than a render-prop function) ensures React treats it as a real
     * component, so hooks inside custom sections work correctly.
     */
    readonly component: ComponentType<SectionRenderContext>;
}

export declare function PatientTimeline(props: PatientTimelineProps): JSX.Element;

export declare interface PatientTimelineProps extends Pick<ResourceTimelineProps<Patient>, 'getMenu'> {
    readonly patient: Patient | Reference<Patient>;
}

export declare function Pharmacies(props: PharmaciesProps): JSX.Element;

export declare interface PharmaciesProps {
    readonly patient: Patient;
    readonly pharmacies?: Organization[];
    readonly onClickResource?: (resource: Organization) => void;
    readonly pharmacyDialogComponent?: ComponentType<PharmacyDialogBaseProps>;
}

/** Default Pharmacies section constant (no pharmacy dialog component). */
export declare const PharmaciesSection: PatientSummarySectionConfig;

export { PHARMACY_PREFERENCE_TYPE_SYSTEM }

export { PHARMACY_TYPE_PREFERRED }

export { PHARMACY_TYPE_PRIMARY }

/**
 * Renders a dialog for searching and adding pharmacies to a patient's favorites.
 * This is a generic component that accepts search and add callbacks.
 * @param props - The dialog props.
 * @returns The pharmacy dialog component.
 */
export declare function PharmacyDialog(props: PharmacyDialogProps): JSX.Element;

/**
 * Base props that any pharmacy dialog component must accept.
 */
export declare interface PharmacyDialogBaseProps {
    readonly patient: Patient;
    readonly onSubmit: (pharmacy: Organization) => void;
    readonly onClose: () => void;
}

export declare interface PharmacyDialogProps {
    readonly patient: Patient;
    readonly onSubmit: (pharmacy: Organization) => void;
    readonly onClose: () => void;
    readonly onSearch: (params: PharmacySearchParams & Record<string, unknown>) => Promise<Organization[]>;
    readonly onAddToFavorites: (params: AddFavoriteParams) => Promise<AddPharmacyResponse>;
    /** Optional fields rendered inside the search form above the submit button. */
    readonly renderBeforeSearchButton?: ReactNode;
    /**
     * Extra search parameters merged into the bot request (e.g. vendor-specific filters).
     * `handleSearch` depends on this callback, so callers should memoize it (e.g. `useCallback`)
     * to avoid re-creating the search handler on every render.
     */
    readonly getExtraSearchParams?: () => Record<string, unknown>;
    /** Optional per-field placeholder overrides for the search form. */
    readonly searchPlaceholders?: PharmacySearchFieldPlaceholders;
}

/**
 * Placeholder text for each pharmacy search field. Vendors can override these to
 * reflect their own API constraints (e.g. DoseSpot requires a 3-character minimum
 * on text searches, whereas ScriptSure expects a 2-letter state and 5-digit ZIP).
 */
export declare interface PharmacySearchFieldPlaceholders {
    readonly name?: string;
    readonly city?: string;
    readonly state?: string;
    readonly zip?: string;
    readonly phoneOrFax?: string;
    readonly address?: string;
    readonly ncpdpID?: string;
}

export { PharmacySearchParams }

export declare function PlanDefinitionBuilder(props: PlanDefinitionBuilderProps): JSX.Element | null;

export declare interface PlanDefinitionBuilderProps {
    readonly value: Partial<PlanDefinition> | Reference<PlanDefinition>;
    readonly onSubmit: (result: PlanDefinition) => void;
}

export { PreferredPharmacy }

export declare interface PrimitiveTypeInputProps {
    readonly id?: string;
    readonly name: string;
    readonly 'data-testid'?: string;
    readonly defaultValue?: any;
    readonly required?: boolean;
    readonly error?: string;
    readonly disabled?: boolean;
}

/** Problem List section — searches for Condition resources. */
export declare const ProblemListSection: PatientSummarySectionConfig;

export declare function QrCodeScanner({ onScan, onError, scanOnce }: QrCodeScannerProps): JSX.Element;

export declare interface QrCodeScannerProps {
    readonly onScan: (data: string) => void;
    readonly onError?: (error: Error) => void;
    readonly scanOnce?: boolean;
}

export declare function QuantityDisplay(props: QuantityDisplayProps): JSX.Element | null;

export declare interface QuantityDisplayProps {
    readonly value?: Quantity;
    readonly precision?: number;
}

export declare function QuantityInput(props: QuantityInputProps): JSX.Element;

export declare interface QuantityInputProps extends ComplexTypeInputProps<Quantity> {
    readonly autoFocus?: boolean;
    readonly required?: boolean;
    readonly disableWheel?: boolean;
}

export declare const QUESTIONNAIRE_CALCULATED_EXPRESSION_URL = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-calculatedExpression";

export declare const QUESTIONNAIRE_ENABLED_WHEN_EXPRESSION_URL = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression";

export declare const QUESTIONNAIRE_HIDDEN_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-hidden";

export declare const QUESTIONNAIRE_ITEM_CONTROL_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";

export declare const QUESTIONNAIRE_REFERENCE_FILTER_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceFilter";

export declare const QUESTIONNAIRE_REFERENCE_RESOURCE_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-referenceResource";

export declare const QUESTIONNAIRE_SIGNATURE_REQUIRED_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-signatureRequired";

export declare const QUESTIONNAIRE_SIGNATURE_RESPONSE_URL = "http://hl7.org/fhir/StructureDefinition/questionnaireresponse-signature";

export declare const QUESTIONNAIRE_VALIDATION_ERROR_URL = "http://hl7.org/fhir/StructureDefinition/questionnaire-validationError";

export declare function QuestionnaireBuilder(props: QuestionnaireBuilderProps): JSX.Element | null;

export declare interface QuestionnaireBuilderProps {
    readonly questionnaire: Partial<Questionnaire> | Reference<Questionnaire>;
    readonly onSubmit: (result: Questionnaire) => void;
    readonly autoSave?: boolean;
}

export declare function QuestionnaireForm(props: QuestionnaireFormProps): JSX.Element | null;

export declare interface QuestionnaireFormLoadedState {
    /** Not loading */
    readonly loading: false;
    /** The loaded questionnaire */
    questionnaire: Questionnaire;
    /** The current draft questionnaire response */
    questionnaireResponse: QuestionnaireResponse;
    /** Optional questionnaire subject */
    subject?: Reference;
    /** Optional questionnaire encounter */
    encounter?: Reference<Encounter>;
    /** The top level items for the current page */
    items: QuestionnaireItem[];
    /** The response items for the current page */
    responseItems: QuestionnaireResponseItem[];
    /**
     * Adds a new group item to the current context.
     * @param context - The current context of the questionnaire response items.
     * @param item - The questionnaire item that is being added to the group.
     */
    onAddGroup: (context: QuestionnaireResponseItem[], item: QuestionnaireItem) => void;
    /**
     * Adds an answer to a repeating item.
     * @param context - The current context of the questionnaire response items.
     * @param item - The questionnaire item that is being answered.
     */
    onAddAnswer: (context: QuestionnaireResponseItem[], item: QuestionnaireItem) => void;
    /**
     * Changes an answer value.
     * @param context - The current context of the questionnaire response items.
     * @param item - The questionnaire item that is being answered.
     * @param answer - The answer(s) provided by the user for the questionnaire item.
     */
    onChangeAnswer: (context: QuestionnaireResponseItem[], item: QuestionnaireItem, answer: QuestionnaireResponseItemAnswer[]) => void;
    /**
     * Sets or updates the signature for the questionnaire response.
     * @param signature - The signature to set, or undefined to clear the signature.
     */
    onChangeSignature: (signature: Signature | undefined) => void;
}

export declare interface QuestionnaireFormLoadingState {
    /** Currently loading data such as the Questionnaire or the QuestionnaireResponse default value */
    readonly loading: true;
}

export declare interface QuestionnaireFormPage {
    readonly linkId: string;
    readonly title: string;
    readonly group: QuestionnaireItem & {
        type: 'group';
    };
}

export declare interface QuestionnaireFormPaginationState extends QuestionnaireFormLoadedState {
    readonly pagination: true;
    pages: QuestionnaireFormPage[];
    activePage: number;
    onNextPage: () => void;
    onPrevPage: () => void;
}

export declare interface QuestionnaireFormProps {
    readonly questionnaire: Questionnaire | Reference<Questionnaire>;
    readonly questionnaireResponse?: QuestionnaireResponse | Reference<QuestionnaireResponse>;
    readonly subject?: Reference;
    readonly encounter?: Reference<Encounter>;
    readonly source?: QuestionnaireResponse['source'];
    readonly disablePagination?: boolean;
    readonly excludeButtons?: boolean;
    readonly submitButtonText?: string;
    /** Optional content rendered immediately below the header row, before the form items. */
    readonly afterHeader?: ReactNode;
    readonly onChange?: (response: QuestionnaireResponse) => void;
    readonly onSubmit?: (response: QuestionnaireResponse) => void;
}

export declare interface QuestionnaireFormSinglePageState extends QuestionnaireFormLoadedState {
    readonly pagination: false;
}

export declare type QuestionnaireFormState = QuestionnaireFormLoadingState | QuestionnaireFormSinglePageState | QuestionnaireFormPaginationState;

export declare const QuestionnaireItemType: {
    readonly group: "group";
    readonly display: "display";
    readonly question: "question";
    readonly boolean: "boolean";
    readonly decimal: "decimal";
    readonly integer: "integer";
    readonly date: "date";
    readonly dateTime: "dateTime";
    readonly time: "time";
    readonly string: "string";
    readonly text: "text";
    readonly url: "url";
    readonly choice: "choice";
    readonly openChoice: "open-choice";
    readonly attachment: "attachment";
    readonly reference: "reference";
    readonly quantity: "quantity";
};

export declare type QuestionnaireItemType = (typeof QuestionnaireItemType)[keyof typeof QuestionnaireItemType];

export declare function QuestionnaireResponseDisplay(props: QuestionnaireResponseDisplayProps): JSX.Element;

export declare interface QuestionnaireResponseDisplayProps {
    readonly questionnaireResponse: QuestionnaireResponse | Reference<QuestionnaireResponse>;
}

export declare function RangeDisplay(props: RangeDisplayProps): JSX.Element | null;

export declare interface RangeDisplayProps {
    readonly value?: Range_2;
    readonly precision?: number;
    readonly exclusive?: boolean;
}

/**
 * Renders a Range input.
 * See: https://www.hl7.org/fhir/datatypes.html#Range
 * @param props - Range input properties.
 * @returns Range input element.
 */
export declare function RangeInput(props: RangeInputProps): JSX.Element;

export declare interface RangeInputProps extends ComplexTypeInputProps<Range_2> {
}

/**
 * Renders a Ratio input.
 * See: https://www.hl7.org/fhir/datatypes.html#Ratio
 * @param props - Ratio input properties.
 * @returns Ratio input element.
 */
export declare function RatioInput(props: RatioInputProps): JSX.Element;

export declare interface RatioInputProps extends ComplexTypeInputProps<Ratio> {
}

export declare const reactContext: Context<MedplumContext | undefined>;

export declare function ReferenceDisplay(props: ReferenceDisplayProps): JSX.Element | null;

export declare interface ReferenceDisplayProps {
    readonly value?: Reference;
    readonly link?: boolean;
}

export declare function ReferenceInput<T extends Resource = Resource>(props: ReferenceInputProps<T>): JSX.Element;

export declare interface ReferenceInputProps<T extends Resource = Resource> {
    readonly name: string;
    readonly placeholder?: string;
    readonly defaultValue?: Reference<T>;
    readonly targetTypes?: string[];
    readonly searchCriteria?: Record<string, string>;
    readonly autoFocus?: boolean;
    readonly required?: boolean;
    readonly onChange?: (value: Reference<T> | undefined) => void;
    readonly disabled?: boolean;
}

export declare function ReferenceRangeEditor(props: ReferenceRangeEditorProps): JSX.Element;

export declare interface ReferenceRangeEditorProps {
    readonly definition: ObservationDefinition;
    readonly onSubmit: (result: ObservationDefinition) => void;
}

export declare function ReferenceRangeGroupEditor(props: ReferenceRangeGroupEditorProps): JSX.Element;

/**
 * Helper component that renders an "interval group", which is a set of ObservationDefinitionQualifiedIntervals
 * that have the same filter values
 */
export declare interface ReferenceRangeGroupEditorProps {
    readonly intervalGroup: IntervalGroup;
    readonly unit: string | undefined;
    readonly onChange: (groupId: string, changed: ObservationDefinitionQualifiedInterval) => void;
    readonly onAdd: (groupId: string, added: ObservationDefinitionQualifiedInterval) => void;
    readonly onRemove: (groupId: string, removed: ObservationDefinitionQualifiedInterval) => void;
    readonly onRemoveGroup: (removedGroup: IntervalGroup) => void;
}

export declare function RegisterForm(props: RegisterFormProps): JSX.Element;

export declare interface RegisterFormProps {
    readonly type: 'patient' | 'project';
    readonly login?: string;
    readonly projectId?: string;
    readonly clientId?: string;
    readonly googleClientId?: string;
    readonly recaptchaSiteKey?: string;
    readonly children?: ReactNode;
    readonly onSuccess: () => void;
    readonly onSignIn?: () => void;
}

/**
 * Returns a copy of the questionnaire response with response items for disabled
 * questionnaire items removed.
 *
 * Per the FHIR R4 spec, a QuestionnaireResponse should not include answers for items
 * whose `enableWhen` evaluates to false or whose `questionnaire-hidden` extension is
 * true. The form preserves answers in local state so that re-enabling an item
 * restores its previous value, so callers must strip disabled items before
 * persisting or transmitting the response.
 *
 * @param questionnaire - The questionnaire defining the items.
 * @param response - The current questionnaire response.
 * @returns A new questionnaire response with disabled items removed.
 */
export declare function removeDisabledItems(questionnaire: Questionnaire, response: QuestionnaireResponse): QuestionnaireResponse;

export { removePreferredPharmacyFromPatient }

/**
 * Returns a fragment to be displayed in the search table for the value.
 * @param resource - The parent resource.
 * @param field - The search code or FHIRPath expression.
 * @returns The fragment to display.
 */
export declare function renderValue(resource: Resource, field: SearchControlField): string | JSX.Element | null | undefined;

export declare function RequestGroupDisplay(props: RequestGroupDisplayProps): JSX.Element | null;

export declare interface RequestGroupDisplayProps {
    readonly value?: RequestGroup | Reference<RequestGroup>;
    readonly onStart: (task: Task, input: Reference) => void;
    readonly onEdit: (task: Task, input: Reference, output: Reference) => void;
}

export declare function ResetPasswordForm(props: ResetPasswordFormProps): JSX.Element;

export declare interface ResetPasswordFormProps {
    readonly projectId?: string;
    readonly recaptchaSiteKey?: string;
    readonly onSuccess?: () => void;
    readonly onSignIn?: () => void;
    readonly onRegister?: () => void;
}

export declare function ResourceArrayDisplay(props: ResourceArrayDisplayProps): JSX.Element | null;

export declare interface ResourceArrayDisplayProps {
    /** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
    readonly path?: string;
    readonly property: InternalSchemaElement;
    readonly propertyType: string;
    readonly values: any[];
    readonly ignoreMissingValues?: boolean;
    readonly link?: boolean;
    readonly includeDescriptionListEntry?: boolean;
}

export declare function ResourceArrayInput(props: ResourceArrayInputProps): JSX.Element | null;

export declare interface ResourceArrayInputProps extends BaseInputProps {
    readonly property: ExtendedInternalSchemaElement;
    readonly name: string;
    readonly defaultValue?: any[];
    readonly indent?: boolean;
    readonly onChange?: (value: any[]) => void;
    readonly hideNonSliceValues?: boolean;
}

export declare function ResourceAvatar(props: ResourceAvatarProps): JSX.Element;

export declare interface ResourceAvatarProps extends AvatarProps {
    readonly value?: Reference | Resource;
    readonly link?: boolean;
}

export declare function ResourceBadge(props: ResourceBadgeProps): JSX.Element;

export declare interface ResourceBadgeProps {
    readonly value?: Reference | Resource;
    readonly link?: boolean;
}

export declare function ResourceBlame(props: ResourceBlameProps): JSX.Element | null;

export declare interface ResourceBlameProps {
    readonly history?: Bundle;
    readonly resourceType?: ResourceType;
    readonly id?: string;
}

/**
 * ResourceBoard is a generic master-detail board: it owns data fetching (list search,
 * selection resolution, background refresh via useResourceBoard) and renders the
 * presentational shell with ListWithDetailPane. Escape hatches allow custom loading
 * and selection resolution.
 * @param props - The ResourceBoard React props.
 * @returns The ResourceBoard React node.
 */
export declare function ResourceBoard<T extends Resource = Resource>(props: ResourceBoardProps<T>): JSX.Element;

export declare type ResourceBoardDetailContext = ListWithDetailPaneDetailContext;

export declare type ResourceBoardItemContext<T extends Resource = Resource> = ListWithDetailPaneItemContext<WithId<T>>;

export declare interface ResourceBoardLoadResult<T extends Resource = Resource> {
    readonly items: WithId<T>[];
    readonly total?: number;
}

export declare interface ResourceBoardProps<T extends Resource = Resource> {
    /**
     * The search definition (resourceType + filters + count/offset), like SearchControl.
     * Default fetching searches with `_total=accurate` and `cache: 'no-cache'`.
     * Deep-equality memoized internally, so parents may pass object literals.
     */
    readonly search: SearchRequest;
    /** Selected resource id, typically driven by the URL route param. */
    readonly selectedId?: string;
    /**
     * Custom fetcher replacing the default search (e.g. GraphQL batching, client-side
     * filtering). Re-runs whenever its identity or the search changes — wrap in useCallback.
     */
    readonly loadItems?: (search: SearchRequest, medplum: MedplumClient) => Promise<ResourceBoardLoadResult<T>>;
    /**
     * Selected-resource resolution. Default: find in items by id, else
     * `medplum.readResource(search.resourceType, id)`.
     */
    readonly resolveSelected?: (id: string, items: WithId<T>[], medplum: MedplumClient) => Promise<WithId<T> | undefined>;
    /**
     * Manual refresh trigger: change this value (e.g. a counter) to re-run the load
     * without changing the search. Reloads in place — no skeleton.
     */
    readonly reloadKey?: unknown;
    /** Plain title shown at the left of the header when no `tabs` are provided. */
    readonly headerText?: ReactNode;
    /** Sidebar header tabs. Selecting a tab navigates to its URI. */
    readonly tabs?: ResourceBoardTab[];
    /** Controlled active tab value; consumers derive it from the URL. */
    readonly activeTab?: string;
    /** Right-aligned slot in the sidebar header row: action buttons, filter popovers. */
    readonly headerActions?: ReactNode;
    readonly renderItem: (item: WithId<T>, ctx: ResourceBoardItemContext<T>) => ReactNode;
    /** Shown when the list loads empty. Default: dimmed "No items found". */
    readonly emptyList?: ReactNode;
    /** Shown while the initial or search-change load is in flight. Default: built-in skeleton rows. */
    readonly skeleton?: ReactNode;
    /** Sidebar width in pixels. Default 350. */
    readonly listWidth?: number;
    readonly renderDetail: (selected: WithId<T>, ctx: ResourceBoardDetailContext) => ReactNode;
    /** Shown when nothing is selected or the selection cannot be resolved. */
    readonly emptyDetail?: ReactNode;
    /**
     * Fired by the built-in pagination with the updated offset.
     */
    readonly onChange?: (search: SearchRequest) => void;
    /**
     * Auto-select escape hatch. Called with the first item when a load for the
     * current search completes with items while `selectedId` is undefined.
     * The consumer decides how to navigate (e.g. with history replace).
     */
    readonly onSelectFirst?: (item: WithId<T>) => void;
    /** Fired after every successful load. */
    readonly onLoad?: (items: WithId<T>[], total: number | undefined) => void;
    /** List-load and selection-resolution errors. Default: console.error. */
    readonly onError?: (error: unknown) => void;
}

export declare type ResourceBoardTab = ListWithDetailPaneTab;

export declare function ResourceDiff(props: ResourceDiffProps): JSX.Element;

export declare interface ResourceDiffProps {
    readonly original: Resource;
    readonly revised: Resource;
    readonly ignoreMeta?: boolean;
}

export declare function ResourceDiffTable(props: ResourceDiffTableProps): JSX.Element | null;

export declare interface ResourceDiffTableProps {
    readonly original: Resource;
    readonly revised: Resource;
}

export declare function ResourceForm(props: ResourceFormProps): JSX.Element;

export declare interface ResourceFormProps {
    readonly defaultValue: Partial<Resource> | Reference;
    readonly outcome?: OperationOutcome;
    readonly onSubmit: (resource: Resource) => void;
    readonly onPatch?: (resource: Resource) => void;
    readonly onDelete?: (resource: Resource) => void;
    /** (optional) URL of the resource profile used to display the form. Takes priority over schemaName. */
    readonly profileUrl?: string;
}

export declare function ResourceHistoryTable(props: ResourceHistoryTableProps): JSX.Element;

export declare interface ResourceHistoryTableProps {
    readonly history?: Bundle;
    readonly resourceType?: string;
    readonly id?: string;
}

/**
 * @param props - The props for the ResourceInput component.
 * @returns The ResourceInput component.
 */
export declare function ResourceInput<T extends Resource = Resource>(props: ResourceInputProps<T>): JSX.Element | null;

/**
 * @deprecated Use MultiResourceInput instead, which supports multiple default and selected values.
 */
export declare interface ResourceInputProps<T extends Resource = Resource> {
    readonly resourceType: T['resourceType'];
    readonly name: string;
    readonly defaultValue?: T | Reference<T>;
    readonly searchCriteria?: Record<string, string>;
    readonly placeholder?: string;
    readonly required?: boolean;
    readonly itemComponent?: (props: AsyncAutocompleteOption<T>) => JSX.Element | ReactNode;
    readonly onChange?: (value: T | undefined) => void;
    readonly disabled?: boolean;
    readonly label?: AsyncAutocompleteProps<T>['label'];
    readonly error?: AsyncAutocompleteProps<T>['error'];
}

export declare function ResourceName(props: ResourceNameProps): JSX.Element | null;

export declare interface ResourceNameProps extends TextProps {
    readonly value?: Reference | Resource;
    readonly link?: boolean;
}

/**
 * Low-level component that renders a property from a given resource, given type information.
 * @param props - The ResourcePropertyDisplay React props.
 * @returns The ResourcePropertyDisplay React node.
 */
export declare function ResourcePropertyDisplay(props: ResourcePropertyDisplayProps): JSX.Element | null;

export declare interface ResourcePropertyDisplayProps {
    readonly property?: InternalSchemaElement;
    /** The path identifies the element and is expressed as a "."-separated list of ancestor elements, beginning with the name of the resource or extension. */
    readonly path?: string;
    readonly propertyType: string;
    readonly value: any;
    readonly arrayElement?: boolean;
    readonly maxWidth?: number;
    readonly ignoreMissingValues?: boolean;
    readonly link?: boolean;
    /** (Optional) The `ElemendDefinitionType` to display the property against. Used when displaying extensions.  */
    readonly elementDefinitionType?: ElementDefinitionType;
    /** (Optional) If true and `property` is an array, output is wrapped with a DescriptionListEntry */
    readonly includeArrayDescriptionListEntry?: boolean;
}

export declare function ResourcePropertyInput(props: ResourcePropertyInputProps): JSX.Element;

export declare interface ResourcePropertyInputProps extends BaseInputProps {
    readonly property: ExtendedInternalSchemaElement;
    readonly name: string;
    readonly defaultPropertyType?: string;
    readonly defaultValue: any;
    readonly arrayElement?: boolean;
    readonly onChange?: (value: any, propName?: string) => void;
}

export declare function ResourceTable(props: ResourceTableProps): JSX.Element | null;

export declare interface ResourceTableProps {
    /**
     * The input value either as a resource or a reference.
     */
    readonly value: Resource | Reference;
    /**
     * Optional flag to ignore missing values.
     * By default, missing values are displayed as empty strings.
     */
    readonly ignoreMissingValues?: boolean;
    /**
     * Optional flag to force use the input value.
     * This is useful when you want to display a specific version of the resource,
     * and not use the latest version.
     */
    readonly forceUseInput?: boolean;
    /** (optional) URL of the resource profile used to display the form. */
    readonly profileUrl?: string;
}

export declare function ResourceTimeline<T extends Resource>(props: ResourceTimelineProps<T>): JSX.Element;

export declare interface ResourceTimelineMenuItemContext {
    readonly primaryResource: Resource;
    readonly currentResource: Resource;
    readonly reloadTimeline: () => void;
}

export declare interface ResourceTimelineProps<T extends Resource> {
    readonly value: T | Reference<T>;
    readonly loadTimelineResources: (medplum: MedplumClient, resourceType: ResourceType, id: string) => Promise<PromiseSettledResult<Bundle>[]>;
    readonly createCommunication?: (resource: T, sender: ProfileResource, text: string) => Communication;
    readonly createMedia?: (resource: T, operator: ProfileResource, attachment: Attachment) => Media;
    readonly getMenu?: (context: ResourceTimelineMenuItemContext) => ReactNode;
}

declare function Scheduler_2(props: SchedulerProps): JSX.Element | null;
export { Scheduler_2 as Scheduler }

export declare interface SchedulerProps {
    readonly schedule?: Schedule | Reference<Schedule> | Schedule[] | Reference<Schedule>[];
    fetchSlots?: SlotSearchFunction;
    onSelectSlot?: (slot: Slot) => void;
    children?: React.ReactNode;
}

export declare type SchedulingOption<T> = [T, Date];

/**
 * Component that scrolls the window to the top when the route changes.
 * This is useful for maintaining a good user experience when navigating between pages.
 * @returns Empty JSX fragment as this is a utility component with no visual representation
 */
export declare function ScrollToTop(): null;

export declare class SearchChangeEvent extends Event {
    readonly definition: SearchRequest;
    constructor(definition: SearchRequest);
}

export declare class SearchClickEvent extends Event {
    readonly resource: Resource;
    readonly browserEvent: MouseEvent_2;
    constructor(resource: Resource, browserEvent: MouseEvent_2);
}

/**
 * The SearchControl component represents the embeddable search table control.
 * It includes the table, rows, headers, sorting, etc.
 * It does not include the field editor, filter editor, pagination buttons.
 * @param props - The SearchControl React props.
 * @returns The SearchControl React node.
 */
export declare function SearchControl(props: SearchControlProps): JSX.Element;

/**
 * An additional, computed column appended after the search-result columns.
 *
 * Unlike the columns derived from {@link SearchControlProps.search} fields, an
 * additional column is not backed by a search parameter and has no sort/filter
 * menu: it renders arbitrary content per row. Use it for values that must be
 * computed or fetched separately from the searched resource (e.g. a related
 * resource's status).
 */
export declare interface SearchControlAdditionalColumn {
    /** The column header text. */
    readonly name: string;
    /** Renders the cell contents for the given row resource. */
    readonly renderCell: (resource: Resource) => ReactNode;
}

/**
 * The SearchControlField type describes a field in the search control.
 *
 * In a SearchRequest, a field is a simple string. Strings can be one of the following:
 * 1) Simple property names, which refer to InternalSchemaElement objects
 * 2) Search parameter names, which refer to SearchParameter resources
 *
 * Consider a few examples of how this becomes complicated.
 *
 * "name" (easy)
 *  - element definition path="Patient.name"
 *  - search parameter code="name"
 *
 * "birthDate" (medium)
 *  - refers to the element definition path="Patient.birthDate"
 *  - refers to the search parameter code="birthdate" (note the capitalization)
 *
 * "email" (hard)
 *  - refers to the search parameter code="email"
 *  - refers to the element definition path="Patient.telecom"
 *
 * In the last case, we start with the search parameter, and walk backwards to the
 * element definition in order to get type details for rendering.
 *
 * Overall, we want columns, fields, properties, and search parameters to feel seamless,
 * so we try our darndest to make this work.
 */
export declare interface SearchControlField {
    readonly name: string;
    readonly elementDefinition?: InternalSchemaElement;
    readonly searchParams?: SearchParameter[];
}

export declare interface SearchControlProps {
    readonly search: SearchRequest;
    readonly checkboxesEnabled?: boolean;
    /** Additional computed columns rendered after the search-result columns. */
    readonly additionalColumns?: readonly SearchControlAdditionalColumn[];
    readonly hideToolbar?: boolean;
    readonly hideFilters?: boolean;
    readonly onLoad?: (e: SearchLoadEvent) => void;
    readonly onChange?: (e: SearchChangeEvent) => void;
    readonly onClick?: (e: SearchClickEvent) => void;
    readonly onAuxClick?: (e: SearchClickEvent) => void;
    readonly onNew?: () => void;
    readonly onExport?: () => void;
    readonly onExportCsv?: () => void;
    readonly onExportTransactionBundle?: () => void;
    readonly onDelete?: (ids: string[]) => void;
    readonly onBulk?: (ids: string[]) => void;
}

export declare function SearchFieldEditor(props: SearchFieldEditorProps): JSX.Element | null;

export declare interface SearchFieldEditorProps {
    readonly visible: boolean;
    readonly search: SearchRequest;
    readonly onOk: (search: SearchRequest) => void;
    readonly onCancel: () => void;
}

export declare function SearchFilterEditor(props: SearchFilterEditorProps): JSX.Element | null;

export declare interface SearchFilterEditorProps {
    readonly visible: boolean;
    readonly search: SearchRequest;
    readonly onOk: (search: SearchRequest) => void;
    readonly onCancel: () => void;
}

export declare class SearchLoadEvent extends Event {
    readonly response: Bundle;
    constructor(response: Bundle);
}

export declare type SearchOptions = {
    debounceMs?: number;
    enabled?: boolean;
};

/** Context passed to every section's component. */
export declare interface SectionRenderContext {
    readonly patient: Patient;
    readonly onClickResource?: (resource: Resource) => void;
    /** Named results for each search in the section's `searches` array, keyed by `FhirSearchDescriptor.key`. */
    readonly results: SectionResults;
}

/** Named map of FHIR results for a section: `results[searchKey]` returns the Resource[] for that search. */
export declare type SectionResults = Record<string, Resource[]>;

/**
 * Sends a structured command to the iframe using postMessage.
 *
 * Normally postMessage implies global event listeners. This method uses
 * MessageChannel to create a message channel between the iframe and the parent.
 * @param frame - The receiving IFrame.
 * @param command - The command to send.
 * @returns Promise to the response from the IFrame.
 * @see https://advancedweb.hu/how-to-use-async-await-with-postmessage/
 */
export declare function sendCommand<T = string, R = unknown>(frame: HTMLIFrameElement, command: Command<T>): Promise<R>;

export declare function ServiceRequestTimeline(props: ServiceRequestTimelineProps): JSX.Element;

export declare interface ServiceRequestTimelineProps extends Pick<ResourceTimelineProps<ServiceRequest>, 'getMenu'> {
    readonly serviceRequest: ServiceRequest | Reference<ServiceRequest>;
}

/**
 * Sets the array of filters.
 * @param definition - The original search request.
 * @param filters - The new filters.
 * @returns The updated search request.
 */
export declare function setFilters(definition: SearchRequest, filters: Filter[]): SearchRequest;

/**
 * Sets the offset (starting at zero).
 * @param definition - The original search request.
 * @param offset - The offset number.
 * @returns The updated search request.
 */
export declare function setOffset(definition: SearchRequest, offset: number): SearchRequest;

/**
 * Creates a new search request with the search offset at the specified page.
 * @param definition - The search definition.
 * @param page - The new page number
 * @returns The new search definition.
 */
export declare function setPage(definition: SearchRequest, page: number): SearchRequest;

export declare function SetPasswordForm(props: SetPasswordFormProps): JSX.Element;

export declare interface SetPasswordFormProps {
    readonly id: string;
    readonly secret: string;
    readonly onSuccess?: () => void;
    readonly onSignIn?: () => void;
}

export declare function setPropertyValue(obj: any, key: string, propName: string, elementDefinition: InternalSchemaElement, value: any): any;

export declare function setQuestionnaireItemReferenceTargetTypes(item: QuestionnaireItem, targetTypes: ResourceType[] | undefined): QuestionnaireItem;

/**
 * Sorts the search by the specified key, and optional direction.
 * Direction defaults to ascending ('asc') if not specified.
 * @param definition - The original search request.
 * @param sort - The sort key.
 * @param desc - Optional descending flag. Default is false.
 * @returns The updated search request.
 */
export declare function setSort(definition: SearchRequest, sort: string, desc?: boolean): SearchRequest;

/** Sexual Orientation section — searches for Observation resources by LOINC 76690-7. */
export declare const SexualOrientationSection: PatientSummarySectionConfig;

export declare function SignatureInput(props: SignatureInputProps): JSX.Element;

export declare interface SignatureInputProps extends PaperProps {
    readonly width?: number;
    readonly height?: number;
    readonly defaultValue?: Signature;
    readonly who?: Reference<ProfileResource>;
    readonly onChange: ((value: Signature | undefined) => void) | undefined;
}

/**
 * The SignInForm component allows users to sign in to Medplum.
 *
 * "Signing in" is a multi-step process:
 * 1) Authentication - identify the user
 * 2) MFA - If MFA is enabled, prompt for MFA code
 * 3) Choose profile - If the user has multiple profiles, prompt to choose one
 * 4) Choose scope - If the user has multiple scopes, prompt to choose one
 * 5) Success - Return to the caller with either a code or a redirect
 * @param props - The SignInForm React props.
 * @returns The SignInForm React node.
 */
export declare function SignInForm(props: SignInFormProps): JSX.Element;

export declare interface SignInFormProps extends BaseLoginRequest {
    readonly login?: string;
    readonly chooseScopes?: boolean;
    readonly disableEmailAuth?: boolean;
    readonly disableGoogleAuth?: boolean;
    readonly onSuccess?: () => void;
    readonly onForgotPassword?: () => void;
    readonly onRegister?: () => void;
    readonly onCode?: (code: string) => void;
    readonly children?: ReactNode;
    readonly chooseScopeFormProps?: Omit<ChooseScopeFormProps, 'login' | 'scope' | 'handleAuthResponse'>;
}

/**
 * Custom function to search for available slots within a given time period
 * @param period - The time period to search within
 * @returns Promise resolving to an array of available slots
 */
export declare type SlotSearchFunction = (period: Period) => Promise<Slot[]>;

export declare function SmartAppLaunchLink(props: SmartAppLaunchLinkProps): JSX.Element | null;

export declare interface SmartAppLaunchLinkProps extends AnchorProps {
    readonly client: ClientApplication;
    readonly patient?: Reference<Patient>;
    readonly encounter?: Reference<Encounter>;
    readonly fhirContext?: Reference[];
    readonly children?: ReactNode;
}

export declare interface SmartSearchResponse {
    readonly data: {
        ResourceList: Resource[];
    };
}

/** Smoking Status section — searches for Observation resources by LOINC 72166-2. */
export declare const SmokingStatusSection: PatientSummarySectionConfig;

/**
 * Sorts an array of resources in place by meta.lastUpdated ascending.
 * @param resources - Array of resources.
 * @param timelineResource - Optional primary resource of a timeline view. If specified, the primary resource will be sorted by meta.lastUpdated descending.
 */
export declare function sortByDateAndPriority(resources: Resource[], timelineResource?: Resource): void;

export declare function Spotlight({ patientsOnly }: SpotlightProps): JSX.Element;

export declare interface SpotlightProps {
    readonly patientsOnly?: boolean;
}

export declare function StatusBadge(props: StatusBadgeProps): JSX.Element;

export declare interface StatusBadgeProps extends Omit<BadgeProps, 'children'> {
    readonly status: string;
}

export declare function SubmitButton(props: ButtonProps): JSX.Element;

export declare type SubmitButtonProps = Omit<ButtonProps, 'type' | 'loading'>;

export declare interface SummaryResourceListOptions {
    /** Unique key for React reconciliation. */
    readonly key: string;
    /** Section title displayed in the collapsible header. */
    readonly title: string;
    /** FHIR search configuration. */
    readonly search: {
        readonly resourceType: ResourceType;
        /** Which search param references the patient. Defaults to 'subject'. */
        readonly patientParam?: string;
        /** Additional search params. */
        readonly query?: Record<string, string | number | boolean | undefined>;
    };
    /** Override the default display string for each resource. */
    readonly getDisplayString?: (resource: Resource) => string;
    /** Return a status badge config, or undefined to show no badge. */
    readonly getStatus?: (resource: Resource) => {
        label: string;
        color: string;
    } | undefined;
    /** Return secondary text (shown dimmed below the primary text). */
    readonly getSecondaryText?: (resource: Resource) => string | undefined;
    /** Filter resources before display. */
    readonly filter?: (resource: Resource) => boolean;
    /** Sort resources before display. */
    readonly sort?: (a: Resource, b: Resource) => number;
    /** Callback for the "+" add button. If omitted, no add button is shown. */
    readonly onAdd?: () => void;
}

/**
 * Creates a `PatientSummarySectionConfig` that renders a list of resources
 * using the same visual pattern as built-in sections (CollapsibleSection + SummaryItem + StatusBadge).
 * @param options - Configuration for the resource list section.
 * @returns A section config that renders a generic resource list.
 */
export declare function summaryResourceListSection(options: SummaryResourceListOptions): PatientSummarySectionConfig;

export declare type SupportedProfileStructureDefinition = StructureDefinition & {
    url: NonNullable<StructureDefinition['url']>;
    name: NonNullable<StructureDefinition['name']>;
};

export declare interface TabDefinition {
    readonly label: string;
    readonly value: string;
}

export declare function ThreadChat(props: ThreadChatProps): JSX.Element | null;

export declare interface ThreadChatProps {
    readonly thread: Communication;
    readonly title?: string;
    readonly onMessageSent?: (message: Communication) => void;
    readonly inputDisabled?: boolean;
    readonly excludeHeader?: boolean;
    readonly uploadEnabled?: boolean;
    readonly onError?: (err: Error) => void;
    readonly onViewInDocuments?: (reference: Reference<DocumentReference>) => void;
}

export declare function ThreadInbox(props: ThreadInboxProps): JSX.Element;

/**
 * ThreadInbox is a component that displays a list of threads and allows the user to select a thread to view.
 * @param query - The query to fetch all communications.
 * @param threadId - The id of the thread to select.
 * @param subject - The default subject when creating a new thread.
 * @param showPatientSummary - Whether to show the patient summary.
 * @param sections - Optional sections configuration for the patient summary.
 * @param onNew - A function to handle a new thread.
 * @param getThreadUri - A function to build thread URIs.
 * @param onChange - A function to handle search changes.
 * @param inProgressUri - The URI for in-progress threads.
 * @param completedUri - The URI for completed threads.
 */
export declare interface ThreadInboxProps {
    readonly query: string;
    readonly threadId: string | undefined;
    readonly subject?: Reference<Patient> | Patient;
    readonly showPatientSummary?: boolean;
    readonly sections?: PatientSummarySectionConfig[];
    readonly onNew: (message: Communication) => void;
    readonly getThreadUri: (topic: Communication) => string;
    readonly onChange: (search: SearchRequest) => void;
    readonly inProgressUri: string;
    readonly completedUri: string;
    readonly uploadEnabled?: boolean;
    readonly onViewInDocuments?: (reference: Reference<DocumentReference>) => void;
    readonly allowPatientSelection?: boolean;
}

export declare function Timeline(props: TimelineProps): JSX.Element;

export declare function TimelineItem(props: TimelineItemProps): JSX.Element;

export declare interface TimelineItemProps<T extends Resource = Resource> extends PanelProps {
    readonly resource: T;
    readonly profile?: Reference;
    readonly dateTime?: string;
    readonly padding?: boolean;
    readonly popupMenuItems?: ReactNode;
}

export declare interface TimelineProps {
    readonly children?: ReactNode;
}

export declare function TimingInput(props: TimingInputProps): JSX.Element;

export declare interface TimingInputProps extends ComplexTypeInputProps<Timing> {
    readonly defaultModalOpen?: boolean;
}

/**
 * Toggles the sort of the search by key.
 * If the search is already sorted by the key, reverses the direction.
 * If the search is not sorted by the key, sort in ascending order.
 * @param definition - The original search request.
 * @param key - The field key name.
 * @returns The updated search request.
 */
export declare function toggleSort(definition: SearchRequest, key: string): SearchRequest;

export declare type TranscriptItem = {
    text: string;
    timestamp: string;
};

export declare function typedValueToResponseItem(item: QuestionnaireItem, value: TypedValue): QuestionnaireResponseItemAnswer | undefined;

export declare function UnavailableNote({ text, color, message }: UnavailableNoteProps): JSX.Element;

export declare interface UnavailableNoteProps {
    readonly text: string;
    readonly color: string;
    readonly message: string;
}

export declare const useCachedBinaryUrl: (binaryUrl: string | undefined) => string | undefined;

/**
 * Vendor-neutral hook for the full **medication cart** lifecycle: add a draft
 * line (`createResource`), check out a set of drafts into the vendor's batch
 * approval queue (`$checkout-medications`), and remove/clear cart lines
 * (`$remove-cart-medication` / `$clear-cart`).
 *
 * Cart checkout / remove / clear hit project-scoped **FHIR custom operations**
 * whose backing Bot is chosen at deploy time via an `OperationDefinition`
 * carrying the `operationDefinition-implementation` extension — see
 * [bot operations docs](https://www.medplum.com/docs/bots/custom-fhir-operations).
 * The server's `tryCustomOperation` dispatch handles the OD → Bot lookup, so
 * projects swap vendors by deploying a different bot under the same code.
 *
 * `addToCart` is plain FHIR `createResource` (no `$add-cart` operation): the
 * Medplum-side cart is the set of draft `MedicationRequest`s. Vendor staging
 * (e.g. ScriptSure MedCart) happens at checkout. Vendors without a batch
 * approval queue (e.g. DoseSpot iframe-first) simply never call `checkout` /
 * `removeFromCart` / `clearCart`.
 *
 * Requests for the custom operations are encoded as `Parameters` bodies and
 * decoded by the matching `@medplum/core` helpers. Per-line outcomes arrive in
 * `response.items`.
 *
 * @returns Cart add / checkout / remove / clear callbacks plus `adding` state.
 */
export declare function useMedicationCart(): UseMedicationCartReturn;

export declare interface UseMedicationCartReturn {
    /**
     * Persist a draft `MedicationRequest` as a cart line via plain FHIR
     * `createResource` (no custom operation). Vendor staging happens later at
     * {@link UseMedicationCartReturn.checkout}.
     */
    addToCart: (medicationRequest: MedicationRequest) => Promise<MedicationRequest>;
    /** True while one or more {@link UseMedicationCartReturn.addToCart} calls are in flight. */
    adding: boolean;
    /**
     * Submit draft cart lines to the vendor's batch approval queue and return an
     * embeddable approval-widget URL. Refuses while {@link UseMedicationCartReturn.adding} is true.
     */
    checkout: (input: MedicationCheckoutRequest) => Promise<MedicationCheckoutResponse>;
    /** Remove a single draft `MedicationRequest` from the patient's vendor cart. */
    removeFromCart: (input: MedicationCartRemoveRequest) => Promise<MedicationCartManageResponse>;
    /** Remove every item from the patient's vendor cart. */
    clearCart: (input: MedicationCartClearRequest) => Promise<MedicationCartManageResponse>;
}

/**
 * Generic React hook that syncs a patient to a medication-order vendor and
 * returns the chart iframe URL.
 *
 * Executes the patient-sync bot first (if patientId is provided), then
 * the iframe bot to obtain the prescribing UI URL.
 *
 * Uses an effect cleanup flag so React 18 Strict Mode double-mount does not
 * trigger duplicate bot executions.
 *
 * @param syncBotIdentifier - Bot identifier for the patient sync bot.
 * @param iframeBotIdentifier - Bot identifier for the iframe URL bot.
 * @param options - Configuration and callback options.
 * @returns The medication-order iframe URL, or undefined while loading.
 */
export declare function useMedicationIFrame(syncBotIdentifier: Identifier, iframeBotIdentifier: Identifier, options: MedicationIFrameOptions): string | undefined;

/**
 * Vendor-neutral hook for e-prescribing drug search and order-medication via
 * **FHIR custom operations** (no Bot identifiers required).
 *
 * Hits two project-scoped operations whose backing Bot is chosen at deploy time
 * via an `OperationDefinition` resource carrying the
 * `operationDefinition-implementation` extension — see
 * [bot operations docs](https://www.medplum.com/docs/bots/custom-fhir-operations).
 * The server's `tryCustomOperation` dispatch handles the OD → Bot lookup, so
 * projects can swap vendors (ScriptSure today, DoseSpot tomorrow) by deploying
 * a different bot under the same operation code.
 *
 * - `searchMedications`: `POST /fhir/R4/Medication/$drug-search` — expects the
 *   bot to return a `Bundle<Medication>` (single-Resource `return` shortcut on
 *   the OperationDefinition).
 * - `orderMedication`: `POST /fhir/R4/MedicationRequest/$order-medication` —
 *   expects the bot to return a `Parameters` envelope with named primitives;
 *   `parametersToMedicationOrderResponse` decodes it.
 *
 * @returns Callbacks to search medications and submit an order request.
 */
export declare function useMedicationOrder(): UseMedicationOrderReturn;

export declare interface UseMedicationOrderReturn {
    searchMedications: (params: MedicationSearchParams) => Promise<Medication[]>;
    orderMedication: (input: MedicationOrderRequest) => Promise<MedicationOrderResponse>;
}

/**
 * Vendor-neutral React hook that calls the `$order-set-url` custom FHIR
 * operation and exposes the resulting iframe URL plus refresh/loading/error
 * state.
 *
 * Hits the project-scoped operation whose backing bot is chosen at deploy time
 * via an `OperationDefinition` resource carrying the
 * `operationDefinition-implementation` extension — see
 * [bot operations docs](https://www.medplum.com/docs/bots/custom-fhir-operations).
 * The server's `tryCustomOperation` dispatch handles the OD → Bot lookup, so
 * projects can swap vendors (ScriptSure today, DoseSpot tomorrow) by deploying
 * a different bot under the same operation code.
 *
 * - URL: `POST /fhir/R4/PlanDefinition/$order-set-url`
 * - Body: `Parameters` with `patientId` + (`planDefinitionId` XOR `vendorOrderSetId`) + optional `appId`.
 * - Returns: `Parameters` whose `launchUrl` is exposed as `url` on the hook.
 *
 * The hook is a "build a URL" hook (mirrors {@link useMedicationIFrame}); it
 * does not stamp Medplum resources or create vendor-side resources, so
 * `refresh` is safe to call repeatedly (the operation is naturally idempotent).
 *
 * Re-runs whenever the input options change. In-flight calls are cancelled on
 * input change and on unmount via a per-effect `cancelled` flag, so React 18
 * Strict Mode double-mount does not surface stale URLs.
 *
 * @param options - Patient, picker (PD or vendor id), and optional appId.
 * @returns `{ url, loading, error, refresh }`.
 */
export declare function useMedicationOrderSet(options: UseMedicationOrderSetOptions): UseMedicationOrderSetReturn;

export declare interface UseMedicationOrderSetOptions {
    /** Patient to prescribe against. Hook stays idle (no operation call) until set. */
    readonly patientId: string | undefined;
    /** Medplum PlanDefinition id (vendor-neutral). Bot resolves it to the vendor's order set id. */
    readonly planDefinitionId?: string;
    /** Vendor-side order set id, when picked directly (escape hatch when no synced PD exists yet). */
    readonly vendorOrderSetId?: number | string;
    readonly appId?: string;
    /** Selected practice location for multi-practice deployments. */
    readonly organization?: Reference<Organization>;
}

export declare interface UseMedicationOrderSetReturn {
    /** Most recent successful URL from the order-set operation, or undefined while loading / on error. */
    readonly url: string | undefined;
    /** True while a request is in flight. */
    readonly loading: boolean;
    /** Last error from the operation call, or undefined. */
    readonly error: unknown;
    /**
     * Force a re-fetch using the current options. Useful when wiring
     * `PrescriptionIFrameModal.onRefreshLaunchUrl` so the session token in
     * the returned widget URL is fresh on every modal open.
     */
    readonly refresh: () => Promise<string | undefined>;
}

/**
 * Returns the MedplumClient instance.
 * This is a shortcut for useMedplumContext().medplum.
 * @returns The MedplumClient instance.
 */
export declare function useMedplum(): MedplumClient;

/**
 * Returns the MedplumContext instance.
 * @returns The MedplumContext instance.
 */
export declare function useMedplumContext(): MedplumContext;

/**
 * Returns the Medplum navigate function.
 * @returns The Medplum navigate function.
 */
export declare function useMedplumNavigate(): MedplumNavigateFunction;

/**
 * Returns the current Medplum user profile (if signed in).
 * This is a shortcut for useMedplumContext().profile.
 * @returns The current user profile.
 */
export declare function useMedplumProfile(): ProfileResource | undefined;

/**
 * Returns a live notification count for a given resource type.
 *
 * Uses `medplum.search()` for the initial count (with default cache policy) and
 * subscribes to real-time updates via `useSubscription()`, re-fetching with
 * `cache: 'reload'` whenever a matching event arrives.
 *
 * @param options - The resource type, count search criteria, and subscription criteria.
 * @returns The current notification count.
 */
export declare function useNotificationCount(options: UseNotificationCountOptions): number;

export declare interface UseNotificationCountOptions {
    readonly resourceType: ResourceType;
    readonly countCriteria: string;
    readonly subscriptionCriteria: string;
}

/**
 * Hook that collects all FHIR searches from section configs, deduplicates them,
 * executes them in parallel, and routes results back to each section.
 * Uses Promise.allSettled so a single failing search does not block all sections —
 * sections whose searches fail gracefully receive empty arrays.
 * @param patient - The patient or patient reference to fetch data for.
 * @param sections - The section configs defining which searches to execute.
 * @returns Section data, loading state, and any error.
 */
export declare function usePatientSummaryData(patient: Patient | Reference<Patient>, sections: {
    readonly key: string;
    readonly searches?: FhirSearchDescriptor[];
}[]): PatientSummaryData;

/**
 * Generic React hook that provides pharmacy search and add-to-favorites
 * functionality for any e-prescribing integration.
 *
 * Encapsulates calls to a search-pharmacy bot and an add-patient-pharmacy bot,
 * and can be composed with the generic `PharmacyDialog` component from `@medplum/react`.
 *
 * The search param type is generic so vendor hooks can widen it with their own
 * filters (e.g. ScriptSure `specialties`); the extra keys are passed through to
 * the bot as-is at runtime.
 *
 * @param searchBotIdentifier - Bot identifier for the pharmacy search bot.
 * @param addPharmacyBotIdentifier - Bot identifier for the add-patient-pharmacy bot.
 * @returns An object with `searchPharmacies` and `addToFavorites` callbacks.
 */
export declare function usePharmacySearch<T extends PharmacySearchParams = PharmacySearchParams>(searchBotIdentifier: Identifier, addPharmacyBotIdentifier: Identifier): UsePharmacySearchReturn<T>;

export declare interface UsePharmacySearchReturn<T extends PharmacySearchParams = PharmacySearchParams> {
    searchPharmacies: (params: T) => Promise<Organization[]>;
    addToFavorites: (params: AddFavoriteParams) => Promise<AddPharmacyResponse>;
}

/**
 * React Hook to keep track of the passed-in value from the previous render of the containing component.
 * @param value - The value to track.
 * @returns The value passed in from the previous render.
 */
export declare function usePrevious<T>(value: T): T | undefined;

export declare function useQuestionnaireForm(props: UseQuestionnaireFormProps): Readonly<QuestionnaireFormState>;

export declare interface UseQuestionnaireFormProps {
    readonly questionnaire: Questionnaire | Reference<Questionnaire>;
    readonly defaultValue?: QuestionnaireResponse | Reference<QuestionnaireResponse>;
    readonly subject?: Reference;
    readonly encounter?: Reference<Encounter>;
    readonly source?: QuestionnaireResponse['source'];
    readonly disablePagination?: boolean;
    readonly onChange?: (response: QuestionnaireResponse) => void;
}

/**
 * React Hook to use a FHIR reference.
 * Handles the complexity of resolving references and caching resources.
 * @param value - The resource or reference to resource.
 * @param setOutcome - Optional callback to set the OperationOutcome.
 * @returns The resolved resource.
 */
export declare function useResource<T extends Resource>(value: Reference<T> | Partial<T> | undefined, setOutcome?: (outcome: OperationOutcome) => void): WithId<T> | undefined;

/**
 * useResourceBoard manages the data layer for the ResourceBoard component:
 * fetching the resource list, resolving the selected resource, and supporting
 * background refresh.
 * @param options - The data options, a subset of the ResourceBoard props.
 * @returns The loaded resources, total, loading state, resolved selection, and refresh helper.
 */
export declare function useResourceBoard<T extends Resource = Resource>(options: UseResourceBoardProps<T>): UseResourceBoardResult<T>;

export declare interface UseResourceBoardProps<T extends Resource = Resource> {
    readonly search: SearchRequest;
    readonly selectedId?: string;
    readonly loadItems?: (search: SearchRequest, medplum: MedplumClient) => Promise<ResourceBoardLoadResult<T>>;
    readonly resolveSelected?: (id: string, items: WithId<T>[], medplum: MedplumClient) => Promise<WithId<T> | undefined>;
    /**
     * Manual refresh trigger: change this value (e.g. a counter) to re-run the load
     * without changing the search. Reloads in place — no skeleton — like `refresh()`.
     */
    readonly reloadKey?: unknown;
    readonly onSelectFirst?: (item: WithId<T>) => void;
    readonly onLoad?: (items: WithId<T>[], total: number | undefined) => void;
    readonly onError?: (error: unknown) => void;
}

export declare interface UseResourceBoardResult<T extends Resource = Resource> {
    readonly items: WithId<T>[];
    readonly total: number | undefined;
    readonly loading: boolean;
    readonly selected: WithId<T> | undefined;
    /**
     * The search currently in effect. Tracks the input `search`, but only updates when it
     * changes by deep equality — so this identity is stable across renders and safe to use
     * in dependency arrays or to derive pagination from.
     */
    readonly search: SearchRequest;
    readonly refresh: () => Promise<void>;
}

/**
 * React hook for observing FHIR resource modifications made through the Medplum client.
 *
 * The callback is invoked whenever this client instance creates, updates, patches, or deletes
 * a resource of one of the given types, including modifications announced with
 * `MedplumClient.notifyResourceModified`. Use it to keep local component state in sync with
 * mutations made elsewhere in the application. Subscribing to a single resource type narrows
 * the event so `event.resource` is typed to that resource, no type guard required:
 *
 * ```tsx
 * useResourceModified('Slot', (event) => {
 *   // event.resource is `WithId<Slot> | undefined`
 * });
 * useResourceModified(['Slot', 'Appointment'], () => refreshSchedule());
 * ```
 *
 * Modifications made by other clients (or other users) are not observed;
 * use `useSubscription` for server-side change notifications.
 *
 * @param resourceType - The resource type or types to observe.
 * @param callback - Invoked with the event payload for each matching modification.
 */
export declare function useResourceModified<K extends ResourceType>(resourceType: K | K[], callback: (event: ResourceModifiedEvent<ExtractResource<K>>) => void): void;

/**
 * React hook for searching FHIR resources.
 *
 * This is a convenience hook for calling the MedplumClient.search() method.
 *
 * @param resourceType - The FHIR resource type to search.
 * @param query - Optional search parameters.
 * @param options - Optional options for configuring the search.
 * @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
 */
export declare function useSearch<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: SearchOptions): [Bundle<WithId<ExtractResource<K>>> | undefined, boolean, OperationOutcome | undefined];

/**
 * React hook for searching for a single FHIR resource.
 *
 * This is a convenience hook for calling the MedplumClient.searchOne() method.
 *
 * @param resourceType - The FHIR resource type to search.
 * @param query - Optional search parameters.
 * @param options - Optional options for configuring the search.
 * @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
 */
export declare function useSearchOne<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: SearchOptions): [WithId<ExtractResource<K>> | undefined, boolean, OperationOutcome | undefined];

/**
 * React hook for searching for an array of FHIR resources.
 *
 * This is a convenience hook for calling the MedplumClient.searchResources() method.
 *
 * @param resourceType - The FHIR resource type to search.
 * @param query - Optional search parameters.
 * @param options - Optional options for configuring the search.
 * @returns A 3-element tuple containing the search result, loading flag, and operation outcome.
 */
export declare function useSearchResources<K extends ResourceType>(resourceType: K, query?: QueryTypes, options?: SearchOptions): [ResourceArray<WithId<ExtractResource<K>>> | undefined, boolean, OperationOutcome | undefined];

/**
 * Creates an in-memory `Subscription` resource with the given criteria on the Medplum server and calls the given callback when an event notification is triggered by a resource interaction over a WebSocket connection.
 *
 * Subscriptions created with this hook are lightweight, share a single WebSocket connection, and are automatically untracked and cleaned up when the containing component is no longer mounted.
 *
 * @param criteria - The FHIR search criteria to subscribe to.
 * @param callback - The callback to call when a notification event `Bundle` for this `Subscription` is received.
 * @param options - Optional options used to configure the created `Subscription`. See {@link UseSubscriptionOptions}
 *
 * --------------------------------------------------------------------------------------------------------------------------------
 *
 * `options` contains the following properties, all of which are optional:
 * - `subscriptionProps` - Allows the caller to pass a `Partial<Subscription>` to use as part of the creation
 * of the `Subscription` resource for this subscription. It enables the user namely to pass things like the `extension` property and to create
 * the `Subscription` with extensions such the {@link https://www.medplum.com/docs/subscriptions/subscription-extensions#interactions | Supported Interaction} extension which would enable to listen for `create` or `update` only events.
 * - `onWebsocketOpen` - Called when the WebSocket connection is established with Medplum server.
 * - `onWebsocketClose` - Called when the WebSocket connection disconnects.
 * - `onSubscriptionConnect` - Called when the corresponding subscription starts to receive updates after the subscription has been initialized and connected to.
 * - `onSubscriptionDisconnect` - Called when the corresponding subscription is destroyed and stops receiving updates from the server.
 * - `onError` - Called whenever an error occurs during the lifecycle of the managed subscription.
 */
export declare function useSubscription(criteria: string | undefined, callback: (bundle: Bundle) => void, options?: UseSubscriptionOptions): void;

export declare type UseSubscriptionOptions = {
    subscriptionProps?: Partial<Subscription>;
    onWebSocketOpen?: () => void;
    onWebSocketClose?: () => void;
    onSubscriptionConnect?: (subscriptionId: string) => void;
    onSubscriptionDisconnect?: (subscriptionId: string) => void;
    onError?: (err: Error) => void;
};

/**
 * Vendor-neutral React hook that syncs a Medplum `PlanDefinition` (type=order-set)
 * to the configured e-prescribing vendor via the `$sync-orderset` custom FHIR operation
 * (`POST /fhir/R4/PlanDefinition/$sync-orderset`).
 *
 * Resolves with the decoded `OrderSetSyncResponse` so callers can surface
 * per-action failures (`results[i].status === 'failed'` / `failedCount > 0`) —
 * without this, an order set that only partially synced would silently apply
 * with fewer meds than the PlanDefinition requested.
 *
 * Resolves with `undefined` when the operation is not deployed (i.e. no
 * e-prescribing vendor is configured for the project), so callers do not need to
 * guard against missing integrations.
 *
 * @returns A stable `syncOrderSet(planDefinitionId, organization?)` callback.
 */
export declare function useSyncOrderSet(): (planDefinitionId: string, organization?: Reference<Organization>) => Promise<OrderSetSyncResponse | undefined>;

export declare function useThreadInbox({ query, threadId }: UseThreadInboxOptions): UseThreadInboxReturn;

export declare interface UseThreadInboxOptions {
    query: string;
    threadId: string | undefined;
}

export declare interface UseThreadInboxReturn {
    loading: boolean;
    error: Error | null;
    threadMessages: [Communication, Communication | undefined][];
    selectedThread: Communication | undefined;
    total: number | undefined;
    addThreadMessage: (message: Communication) => void;
    handleThreadStatusChange: (newStatus: Communication['status']) => void;
    refreshThreadMessages: () => Promise<void>;
}

/**
 * Probes a set of ValueSet URLs for availability, each with a filter-free, count-limited expansion.
 *
 * A filter-free probe means a 400/404 unambiguously describes the value set itself (unlike a
 * user-typed search, whose 400 can be filter-specific), so the verdict is safe to act on. Repeated
 * probes of the same URL are deduplicated by the `MedplumClient` request cache, which caches
 * rejections too, so many fields bound to the same missing value set cost one request. Recovery
 * after a value set is imported happens on the next mount (i.e. a page refresh) — there is no live
 * subscription. Transient failures (429/5xx/network) resolve as available so a blip never disables
 * a field; only a permanent 400/404 marks a URL unavailable.
 * @param urls - The ValueSet URLs to probe. Falsy entries are ignored, and duplicates collapse to a
 * single probe.
 * @returns The availability verdict, with `loading` true until every requested URL has settled.
 */
export declare function useValueSetAvailabilities(urls: readonly (string | undefined)[]): ValueSetAvailability;

/**
 * Probes a single ValueSet's availability once on mount. A thin wrapper around
 * {@link useValueSetAvailabilities} for the common single-value-set case.
 * @param url - The ValueSet URL, or undefined for unbound inputs (always available).
 * @returns undefined while the probe is in flight, true if available, false if unavailable.
 */
export declare function useValueSetAvailability(url: string | undefined): boolean | undefined;

export declare function useWhisper({ language, model, onTranscript, idleTimeoutMs, }: UseWhisperOptions): UseWhisperResult;

export declare type UseWhisperOptions = {
    language?: string;
    model?: string;
    onTranscript?: (text: string) => void;
    /**
     * How long to keep the WebSocket warm after stop() before fully closing it, in milliseconds.
     * Defaults to 120000 (2 minutes). Set to 0 or a non-finite value to keep the socket warm
     * until unmount (the previous behavior).
     */
    idleTimeoutMs?: number;
};

export declare type UseWhisperResult = {
    status: WhisperStatus;
    error: unknown;
    transcripts: TranscriptItem[];
    start: () => Promise<void>;
    stop: () => void;
    isListening: boolean;
    muted: boolean;
    setMuted: (value: boolean) => void;
};

/**
 * A low-level component to autocomplete based on a FHIR Valueset.
 * This is the base component for CodeableConceptInput, CodingInput, and CodeInput.
 * @param props - The ValueSetAutocomplete React props.
 * @returns The ValueSetAutocomplete React node.
 */
export declare function ValueSetAutocomplete(props: ValueSetAutocompleteProps): JSX.Element;

export declare interface ValueSetAutocompleteProps extends Omit<AsyncAutocompleteProps<ValueSetExpansionContains>, 'loadOptions' | 'toKey' | 'toOption'> {
    readonly binding: string | undefined;
    readonly creatable?: boolean;
    readonly clearable?: boolean;
    readonly expandParams?: Partial<ValueSetExpandParams>;
    readonly withHelpText?: boolean;
}

/**
 * The result of probing one or more ValueSet URLs for availability.
 */
export declare interface ValueSetAvailability {
    /** True while at least one requested URL is still being probed. */
    readonly loading: boolean;
    /** The subset of requested URLs known to be available. */
    readonly available: string[];
    /** The subset of requested URLs known to be unavailable (a permanent 400/404). */
    readonly unavailable: string[];
}

export declare function valueSetElementToCoding(element: ValueSetExpansionContains): Coding;

/** Vitals section — searches for Observation resources with category vital-signs. */
export declare const VitalsSection: PatientSummarySectionConfig;

export declare type WhisperStatus = 'idle' | 'requesting_microphone' | 'connecting' | 'connected' | 'listening' | 'speech_started' | 'speech_stopped' | 'disconnected' | 'error';

export { }
