import type { ReactNode } from 'react';
import type { TFunction } from 'i18next';
import type { PracticeAnamnesisConfig } from './anamnesis-config';
import { type AnamnesisCompileView } from './anamnesis-compile';
import type { DisclosureAudience } from './anamnesis-disclosure';
import { type IntakeAnswerMap } from './anamnesis-intake';
import type { MissingAnswer } from './anamnesis-digest';
import type { AnamnesisLeadingTab, AnamnesisQuestionnaireTab } from './anamnesis-questionnaire';
import type { AnamnesisMode, AnamnesisRecord, OpenAnamnesisNote, PractitionerOption } from './anamnesis-types';
/** Rendered in EVERY tab panel of questionnaire mode while the record has
* nothing to show — the host decides when (typically: no interview exists
* yet) and supplies the copy and the create actions. */
export interface AnamnesisEmptyState {
title: string;
description?: string;
primaryAction?: {
label: string;
onClick: () => void;
};
secondaryAction?: {
label: string;
onClick: () => void;
href?: string;
};
}
export interface AnamnesisProps {
/** Which host context to render. */
mode: AnamnesisMode;
record: AnamnesisRecord;
t: TFunction;
/** Override the cascade / test marker (defaults to `anamnesis`). Stories
* pass a per-mode marker so each render is independently addressable. */
dataComponent?: string;
/** Mount flush inside a host section tab: drops the full-page chrome + own
* page heading, and renders a `
` instead of a `
` landmark. */
embedded?: boolean;
/** The practice's own vocabulary — parameters, questionnaire, pathology
* codes. Omit it and the kit-seeded default is used, so every existing
* mount keeps working unchanged. */
config?: PracticeAnamnesisConfig;
/** Compile mode only: a per-patient target was set or cleared. The surface
* keeps its own working copy either way — this is the seam a platform host
* persists through. */
onTargetChange?: (parameterKey: string, target: number | null) => void;
/** Compile mode only: host status chips (signature / expiry / renew /
* save feedback) rendered at the surface header's end. */
statusSlot?: ReactNode;
/** Compile mode only: omit the nutrition-targets strip above the record —
* for hosts that present the record without the goals (e.g. the isolated
* single-section demo). Default false: the strip renders. */
hideTargetStrip?: boolean;
/** Compile / readOnly modes: the host's side panel. Wire it to whatever
* opens a panel in the host shell — in the AlfaDocs folder, the Control
* Room's `openTool`. Omitted = notes are read in place. */
onOpenNote?: OpenAnamnesisNote;
/** Intake mode only: the questionnaire was submitted — receives the full
* answer map. The surface keeps its own draft state either way; this is
* the seam a platform host persists through (mirrors `onTargetChange`). */
onIntakeSubmit?: (answers: IntakeAnswerMap) => void;
/** Intake mode only: open the section containing this field key and move
* focus to it on mount — the landing half of `onMissingAnswerJump`. */
intakeJumpToField?: string;
/** Intake and questionnaire modes: render the answers without letting them
* be changed and drop the submit footer — a host's read of a past
* interview, or a questionnaire with nothing selected to edit. */
readOnly?: boolean;
/** Questionnaire mode only: render this instead of the questionnaire in its
* tab panel (a restriction message), keeping the tab strip and the trend. */
questionnaireSlot?: ReactNode;
/** Questionnaire mode only: the host's per-interview controls, rendered
* inside the questionnaire panel above the questionnaire. */
questionnaireHeaderSlot?: ReactNode;
/** Questionnaire mode only: one empty presentation in every tab panel
* while the record has nothing to show; the tab strip stays put. */
emptyState?: AnamnesisEmptyState;
/** Compile, questionnaire and readOnly modes: draw the trend as one table
* per anamnesis type (visits grouped by `sourceLabel`). Default false. */
partitionBySource?: boolean;
/** Compile mode only: route the Summary's missing-answer jump to a host
* questionnaire surface instead of the internal Compila gaps block. */
onMissingAnswerJump?: (missing: MissingAnswer) => void;
/** Compile mode only: every edit to the working record — the visit-data
* persistence seam (hosts debounce + diff). See `AnamnesisCompileProps`. */
onRecordChange?: (record: AnamnesisRecord) => void;
/** Questionnaire mode only: host tabs rendered before the built-in
* questionnaire and trend tabs, in the same strip. When given and no tab
* is selected, the first one is the default. */
leadingTabs?: ReadonlyArray;
/** Questionnaire mode only: controlled selected tab — a leading tab's
* value, `questionnaire` or `trend`. Pair with `onQuestionnaireTabChange`. */
questionnaireTab?: AnamnesisQuestionnaireTab;
/** Questionnaire mode only: the user picked another tab. */
onQuestionnaireTabChange?: (tab: AnamnesisQuestionnaireTab) => void;
/** Questionnaire mode only: uncontrolled initial tab. Demo/story hook
* too — Chromatic skips play functions. */
defaultQuestionnaireTab?: AnamnesisQuestionnaireTab;
/** Compile mode only: the practice's operators, offered in the visit's
* Practitioner select. Omitted or empty keeps the free-text input. */
practitioners?: PractitionerOption[];
/** Compile mode only: the calendar date a NEW follow-up visit is created
* on. A host passes its "today"; defaults to the latest visit's date. */
newVisitDateIso?: string;
/** Compile mode only: mount on this view instead of Summary. Demo/story
* hook only, for the same Chromatic reason as the flags below. */
defaultView?: AnamnesisCompileView;
/** Compile mode only: mount the export control open / on a given audience.
* Demo/story hooks only — Chromatic skips play functions, so a click-opened
* menu or dialog is never snapshotted. */
defaultExportMenuOpen?: boolean;
defaultShareOpen?: boolean;
defaultExportAudience?: DisclosureAudience;
}
export declare function Anamnesis({ mode, record, t, dataComponent, embedded, config, onTargetChange, hideTargetStrip, statusSlot, onOpenNote, onIntakeSubmit, intakeJumpToField, readOnly, onMissingAnswerJump, onRecordChange, leadingTabs, questionnaireTab, onQuestionnaireTabChange, questionnaireSlot, questionnaireHeaderSlot, emptyState, partitionBySource, defaultQuestionnaireTab, practitioners, newVisitDateIso, defaultView, defaultExportMenuOpen, defaultShareOpen, defaultExportAudience, }: AnamnesisProps): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=anamnesis.d.ts.map