import { type VariantProps } from 'class-variance-authority'; import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result'; import { type CyclePrediction } from './cycle'; declare const rootVariants: (props?: ({ width?: "auto" | "full" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** `CyclePrediction` projected onto the agent boundary — ISO dates, no Dates. */ export interface CyclePredictionSnapshot { /** Estimated ovulation date, `yyyy-MM-dd`. */ ovulation: string; /** Fertile window, `yyyy-MM-dd` endpoints. */ fertileWindow: { start: string; end: string; }; /** Start of the next period, `yyyy-MM-dd`. */ nextPeriod: string; /** Current period's bleed range, or null when no period length was given. */ periodRange: { start: string; end: string; } | null; /** Start dates of the next few periods, `yyyy-MM-dd`. */ upcomingPeriods: string[]; } /** * Curated imperative handle for agent / external automation. Reads the three * cycle inputs and the computed prediction, and drives the inputs the way a * user would. Never exposes patient identity — only structural dates and day * counts. Consumed by `cycle-calculator.agent.ts`; the public `ref` stays the * root DOM element. */ export interface CycleCalculatorHandle { /** Current inputs — ISO date + day counts, or null when unset. */ getInputs: () => { lastPeriodStart: string | null; cycleLength: number | null; periodLength: number | null; }; /** Computed prediction, or null until a last-period date is set. */ getResult: () => CyclePredictionSnapshot | null; /** Set the last period's start date (`yyyy-MM-dd`, not in the future). */ setLastPeriod: (isoDate: string | null) => boolean; /** Set the average cycle length in days (20–45). */ setCycleLength: (days: number | null) => boolean; /** Set the period (bleed) length in days (1–14). */ setPeriodLength: (days: number | null) => boolean; } export interface CycleCalculatorProps extends VariantProps { /** Initial cycle length in days. Defaults to 28. */ defaultCycleLength?: number; /** Fires whenever a prediction can be computed (and `null` when it can't). */ onResultChange?: (result: CyclePrediction | 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'`. * 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 CycleCalculator: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=cycle-calculator.d.ts.map