import { type VariantProps } from 'class-variance-authority'; import { type InsertPayload, type InsertVariant, type InsertMode } from '../_shared/insert-result'; import { type UnitCategory } from './units'; declare const rootVariants: (props?: ({ width?: "auto" | "full" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; export interface UnitConverterProps extends VariantProps { /** Initial category. Defaults to `'weight'`. */ defaultCategory?: UnitCategory; /** Fires with the converted value (and `null` when input is empty). */ onResultChange?: (value: number | 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; } /** * Curated imperative handle for agent / external automation. Reads/writes the * structural inputs (category, value, from/to units) and the converted result. * No patient identity. Consumed by the `unit-converter.agent.ts` adapter; the * public `ref` stays the DOM element. */ export interface UnitConverterHandle { /** Active measurement family. */ getCategory: () => UnitCategory; /** Switch the measurement family (resets from/to units to that category). */ setCategory: (next: UnitCategory) => void; /** Source value + from/to unit ids. */ getInputs: () => { value: number | null; fromId: string; toId: string; }; /** Set the source value to convert. */ setValue: (value: number | null) => void; /** Set from-unit and/or to-unit (ids outside the active category are ignored). */ setUnits: (next: { fromId?: string; toId?: string; }) => void; /** Converted value in the to-unit, or null when no source value is set. */ getResult: () => number | null; } export declare const UnitConverter: import("react").ForwardRefExoticComponent>; export {}; //# sourceMappingURL=unit-converter.d.ts.map