import { type VariantProps } from 'class-variance-authority'; import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result'; import { type UnitSystem, type BmiCategory } from './bmi'; export interface BmiResult { /** BMI in kg/m². */ bmi: number; /** WHO category the BMI falls into. */ category: BmiCategory; } /** * Curated imperative handle for agent / external automation. Reads/writes the * canonical metric measurements and the WHO result, and switches the display * unit system. Never exposes patient identity. Consumed by the * `bmi-calculator.agent.ts` adapter; the public `ref` stays the DOM element. */ export interface BmiCalculatorHandle { /** Active display unit system. */ getUnitSystem: () => UnitSystem; /** Switch the display unit system (entered figures are converted, not lost). */ setUnitSystem: (next: UnitSystem) => void; /** Canonical metric snapshot — height in cm and weight in kg, or null. */ getInputs: () => { heightCm: number | null; weightKg: number | null; }; /** Set height (cm) and/or weight (kg) in canonical metric units. */ setMetric: (next: { heightCm?: number | null; weightKg?: number | null; }) => void; /** Current computed result, or null until both inputs are valid. */ getResult: () => BmiResult | null; /** Clear height and weight. */ reset: () => void; } declare const rootVariants: (props?: ({ width?: "auto" | "full" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export interface BmiCalculatorProps extends VariantProps { /** Initial unit system. Defaults to `'metric'`. */ defaultUnitSystem?: UnitSystem; /** Fires whenever a valid BMI can be computed (and with `null` when it can't). */ onResultChange?: (result: BmiResult | null) => void; /** When provided, shows an "Insert" button that emits the result for an editor. */ onInsert?: (payload: InsertPayload) => void; /** * Which verb the result button performs. Defaults to `'insert'`. * Use `'copy'` in an app-shell surface (no editor to insert into) — the * button writes the result to the clipboard as a multi-format `ClipboardItem`. */ insertVariant?: InsertVariant; /** `copy` variant only — fired after a successful clipboard write. */ onCopy?: (mode: InsertMode) => void; /** `copy` variant only — fired if the clipboard write can't proceed. */ onError?: (error: unknown) => void; /** * Brand wordmark printed in the inserted/copied result-card footer. * Omitted → no brand line (and no footer hairline); a string → that custom * brand; `false` → no brand line. Brand is opt-in. */ insertBrand?: string | false; /** Opaque instance id, emitted as `data-component-id`. */ id?: string; /** Extra class names on the wrapper. */ className?: string; } export declare const BmiCalculator: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=bmi-calculator.d.ts.map