import type { IdentityIntakeSpec, IdentityIntakeValues } from '../../generated/types.js'; /** Which identity fields the card knows how to render. */ export type IdentityFieldKey = 'name' | 'email' | 'phone'; /** A single field in an `identity_intake` spec (the ergonomic, array-friendly view * of the generated tuple type). */ export interface IdentityField { key: IdentityFieldKey; required: boolean; label?: string; } /** A per-field validation error surfaced from an `interaction_invalid` event. * `field` is the field `key` (`name` / `email` / `phone`). */ export interface IdentityError { field: string; message: string; } export interface IdentityIntakeCardProps { /** The `identity_intake` spec carried on the `interaction_required` event. */ spec: IdentityIntakeSpec; /** Human-readable reason the agent raised the ask (card header). */ reason?: string; /** Called with the canonical values (only the filled-in fields) on submit. */ onSubmit: (values: IdentityIntakeValues) => void; /** Called when the visitor declines the interaction. */ onDecline: () => void; /** Per-field server validation errors (keyed by field `key`). */ errors?: IdentityError[]; /** Disable all controls (e.g. while a submit is in flight). */ busy?: boolean; className?: string; } /** * Build the canonical {@link IdentityIntakeValues} from the card's working state. * * Pure + exported so the payload shape is unit-testable without a DOM. Only fields * present in the spec with a non-blank (trimmed) value are emitted — an empty * optional field is omitted entirely rather than sent as `""`. */ export declare function buildIdentityValues(fields: IdentityField[], state: Record): IdentityIntakeValues; export declare function IdentityIntakeCard({ spec, reason, onSubmit, onDecline, errors, busy, className }: IdentityIntakeCardProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=IdentityIntakeCard.d.ts.map