import { type VariantProps } from 'class-variance-authority'; import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result'; import { type DueDateMethod, type EmbryoAge, type DueDateResult } from '../_shared/obstetrics'; import { type AntenatalScheduleOptions } from '../_shared/antenatal-schedule'; declare const rootVariants: (props?: ({ width?: "auto" | "full" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** The dating inputs as entered. */ export interface DueDateInputsSnapshot { /** Which anchor the pregnancy is dated from. */ method: DueDateMethod; /** The method's reference date (`yyyy-MM-dd`), or null when unset. */ referenceDate: string | null; /** LMP only — average cycle length in days, or null for the 28-day default. */ cycleLength: number | null; /** IVF only — embryo age at transfer, in days. */ embryoAge: EmbryoAge; /** LMP only — crown-rump length in millimetres, or null. */ crlMm: number | null; /** LMP only — date of the CRL scan (`yyyy-MM-dd`), or null. */ scanDate: string | null; /** The date gestational age and trimester are evaluated against. */ asOfDate: string; } /** `DueDateResult` projected onto the agent boundary — ISO dates, no Dates. */ export interface DueDateSnapshot { /** Estimated date of delivery, `yyyy-MM-dd`. */ dueDate: string; /** GA day-0 anchor (effective LMP) after any CRL re-dating, `yyyy-MM-dd`. */ gestationalStart: string; /** Gestational age as of the evaluation date; null before conception. */ gestationalAge: { weeks: number; days: number; totalDays: number; } | null; /** Trimester band as of the evaluation date. */ trimester: DueDateResult['trimester']; } /** * Curated imperative handle for agent / external automation. Reads the dating * inputs and the computed due date, and drives the inputs the way a user * would. Never exposes patient identity — only structural dates and numbers. * Consumed by `due-date-calculator.agent.ts`; the public `ref` stays the root * DOM element. */ export interface DueDateCalculatorHandle { /** The dating inputs as entered. */ getInputs: () => DueDateInputsSnapshot; /** Computed due date, gestational age and trimester, or null until a reference date is set. */ getResult: () => DueDateSnapshot | null; /** Switch the dating method. Keeps the reference date, which is re-interpreted. */ setMethod: (method: DueDateMethod) => boolean; /** Set the method's reference date (`yyyy-MM-dd`, not in the future). */ setReferenceDate: (isoDate: string | null) => boolean; /** LMP only — set the average cycle length in days (20–45). */ setCycleLength: (days: number | null) => boolean; /** IVF only — set the embryo age at transfer (3 or 5 days). */ setEmbryoAge: (days: EmbryoAge) => boolean; /** LMP only — set the CRL measurement and/or its scan date for ACOG re-dating. */ setCrl: (next: { crlMm?: number | null; scanDate?: string | null; }) => boolean; /** Set the date gestational age and trimester are evaluated against. */ setAsOfDate: (isoDate: string) => boolean; } export interface DueDateCalculatorProps extends VariantProps { /** Initial dating method. Defaults to `'lmp'`. */ defaultMethod?: DueDateMethod; /** Fires whenever a due date can be computed (and with `null` when it can't). */ onResultChange?: (result: DueDateResult | 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; /** * Append the antenatal exam schedule (the time-sensitive screening windows) * below the result, dated from the computed gestational start. */ showSchedule?: boolean; /** * Passthrough options for the appended schedule (national `schedule`, * `plurality`, `chorionicity`, `rhNegative`, `gdmRisk`, …). `today` is * supplied by the component. Ignored unless `showSchedule` is set. */ scheduleOptions?: Omit; /** Opaque instance id, emitted as `data-component-id`. */ id?: string; /** Extra class names on the wrapper. */ className?: string; } /** * @deprecated Superseded by `PregnancyDating`, which unifies the due-date and * gestational-age calculators (any anchor → both EDD and current GA) and adds a * manual ±days dating adjustment. This component will be removed in a future * release; migrate to `PregnancyDating` (`defaultMethod="lmp"`). */ export declare const DueDateCalculator: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=due-date-calculator.d.ts.map