import { type ReactNode } from 'react'; import type { TFunction } from 'i18next'; import { type IntakeAnswerMap } from './anamnesis-intake'; import type { AnamnesisEmptyState } from './anamnesis'; import type { PracticeAnamnesisConfig } from './anamnesis-config'; import type { AnamnesisRecord } from './anamnesis-types'; export interface AnamnesisQuestionnaireProps { record: AnamnesisRecord; t: TFunction; /** The practice's configured vocabulary. Omitted = the kit-seeded default. */ config?: PracticeAnamnesisConfig; /** The questionnaire was submitted — receives the full answer map. The * surface keeps its own working copy either way; this is the seam a * platform host persists through. */ onSubmit?: (answers: IntakeAnswerMap) => void; /** Open the section containing this field key and focus it on mount. */ jumpToField?: string; /** Host status chips (signature / expiry / save feedback) above the tabs. */ statusSlot?: ReactNode; /** A per-patient goal target was set or cleared (`null` clears it). The * surface keeps its own working copy either way — this is the seam a * platform host persists through. Omit it and the goals strip still * renders and still edits, it simply persists nowhere. */ onTargetChange?: (parameterKey: string, target: number | null) => void; /** Omit the goals strip above the card. Default false: it renders whenever * the vocabulary marks at least one parameter as a goal. */ hideTargetStrip?: boolean; /** Host tabs rendered BEFORE the built-in questionnaire and trend tabs, * inside the same tab strip. Each value must be unique and must not * collide with `questionnaire` / `trend`. */ leadingTabs?: ReadonlyArray; /** Controlled selected tab — a leading tab's value, `questionnaire` or * `trend`. Pair with `onTabChange`; omit for uncontrolled. */ tab?: AnamnesisQuestionnaireTab; /** The user picked another tab. Fires in both modes, so an uncontrolled * host can still observe the selection. */ onTabChange?: (tab: AnamnesisQuestionnaireTab) => void; /** Uncontrolled initial tab. Defaults to the first leading tab when there * is one, else the questionnaire. Demo/story hook too — Chromatic skips * play functions, so a click-selected tab is never snapshotted. */ defaultTab?: AnamnesisQuestionnaireTab; /** Lock the questionnaire (every control disabled, no footer). A host with * nothing to edit — no interview selected yet — must not offer a Submit * that would post into the void. */ readOnly?: boolean; /** Render this INSTEAD of the questionnaire in its tab panel — the host's * restriction message when the reader may not see the answers. The tab * strip stays, so the trend and the host's own tabs remain reachable; * unmounting the whole surface for one withheld panel took them with it. */ questionnaireSlot?: ReactNode; /** Rendered INSIDE the questionnaire's tab panel, above the questionnaire — * the host's per-interview controls (its date, its signature state). They * belong to the interview being answered, so they show only when it does; * in the shared tab header they sat beside host tabs about other things. */ questionnaireHeaderSlot?: ReactNode; /** ONE empty presentation in EVERY tab panel while the record has nothing * to show — the host decides when. The tab strip stays exactly as it is, so * the layout does not jump the moment the first interview is created. */ emptyState?: AnamnesisEmptyState; /** One trend table per anamnesis type instead of one grid over every * module's visits. Default false. */ partitionBySource?: boolean; } /** A host-supplied tab that precedes the built-in ones. */ export interface AnamnesisLeadingTab { value: string; label: string; content: ReactNode; } /** The built-in tab values, widened so a host's leading-tab values type * without a cast. */ export type AnamnesisQuestionnaireTab = 'questionnaire' | 'trend' | (string & {}); export declare function AnamnesisQuestionnaire({ record, t, config, onSubmit, jumpToField, statusSlot, onTargetChange, hideTargetStrip, leadingTabs, readOnly, questionnaireSlot, questionnaireHeaderSlot, emptyState, partitionBySource, tab: tabProp, onTabChange, defaultTab, }: AnamnesisQuestionnaireProps): import("react/jsx-runtime").JSX.Element; export declare namespace AnamnesisQuestionnaire { var displayName: string; } //# sourceMappingURL=anamnesis-questionnaire.d.ts.map