import { type VariantProps } from 'class-variance-authority'; import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result'; import { type EmbryoAge, type GestationalAge, type DueDateResult, type Plurality, type Chorionicity } from '../_shared/obstetrics'; import { type AntenatalScheduleOptions, type GdmRisk } from '../_shared/antenatal-schedule'; declare const rootVariants: (props?: ({ width?: "auto" | "full" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** Any known anchor the pregnancy can be dated from. */ export type DatingMethod = 'lmp' | 'conception' | 'ivf' | 'edd'; export interface PregnancyDatingResult { /** Estimated date of delivery. */ dueDate: Date; /** GA day-0 anchor (effective LMP) after any re-dating / adjustment. */ gestationalStart: Date; /** Gestational age as of the evaluation date; `null` before conception. */ gestationalAge: GestationalAge | null; trimester: DueDateResult['trimester']; } /** The dating inputs as entered. */ export interface PregnancyDatingInputsSnapshot { /** Which anchor the pregnancy is dated from. */ method: DatingMethod; /** 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; /** Manual ±days nudge applied to the dating, or null. */ datingAdjustment: number | null; /** The date gestational age and trimester are evaluated against. */ asOfDate: string; } /** `PregnancyDatingResult` projected onto the agent boundary — ISO dates. */ export interface PregnancyDatingSnapshot { /** Estimated date of delivery, `yyyy-MM-dd`. */ dueDate: string; /** GA day-0 anchor after any re-dating / adjustment, `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 EDD + gestational age, and drives the inputs the way * a user would. Never exposes patient identity — only structural dates and * numbers. Consumed by `pregnancy-dating.agent.ts`; the public `ref` stays the * root DOM element. */ export interface PregnancyDatingHandle { /** The dating inputs as entered. */ getInputs: () => PregnancyDatingInputsSnapshot; /** Computed due date, gestational age and trimester, or null until a reference date is set. */ getResult: () => PregnancyDatingSnapshot | null; /** Switch the dating anchor. Keeps the reference date, which is re-interpreted. */ setMethod: (method: DatingMethod) => boolean; /** Set the method's reference date (`yyyy-MM-dd`); only a known EDD may be 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 manual ±days dating nudge (positive = further along). */ setDatingAdjustment: (days: number | null) => boolean; /** Set the date gestational age and trimester are evaluated against. */ setAsOfDate: (isoDate: string) => boolean; } export interface PregnancyDatingProps extends VariantProps { /** Initial dating method. Defaults to `'lmp'`. */ defaultMethod?: DatingMethod; /** Pre-fill the reference date (e.g. a known LMP from the patient record). */ defaultReferenceDate?: Date; /** Fires whenever a result can be computed (and `null` when it can't). */ onResultChange?: (result: PregnancyDatingResult | null) => void; /** When provided, shows the result-action buttons that emit / copy the result. */ onInsert?: (payload: InsertPayload) => void; /** Which verb the result button performs. Defaults to `'insert'`. */ 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. */ insertBrand?: string | false; /** Append the antenatal exam schedule + reveal the plurality / risk inputs. */ showSchedule?: boolean; /** `showSchedule` only — initial number of babies. Defaults to `'singleton'`. */ defaultPlurality?: Plurality; /** `showSchedule` only — initial chorionicity for multiples. Defaults to `'unknown'`. */ defaultChorionicity?: Chorionicity; /** `showSchedule` only — initial Rh-negative state (surfaces anti-D). */ defaultRhNegative?: boolean; /** `showSchedule` only — initial gestational-diabetes risk tier (surfaces OGTT). */ defaultGdmRisk?: GdmRisk; /** * Passthrough options for the appended schedule (national `schedule`, * `includeOnIndication`, `birthGuideline`). `today`, `plurality`, * `chorionicity`, `rhNegative` and `gdmRisk` come from the component's own * inputs. 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; } export declare const PregnancyDating: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=pregnancy-dating.d.ts.map