/** * InteractionQuestionCard — the agent-ask card every sandbox-backed chat UI * forked (~1,000 lines each in gtm/legal/tax). Renders the answerSpec * verbatim: selects (radio/checkbox by `multi`, write-in row only when the * sidecar granted `allowCustom`), free text, and minimal number/boolean/secret * inputs for open kinds. * * Behavior lifted from the gtm-agent fork (the most fix-absorbed): * - a terminal stream status always wins over local optimistic state, * - a 410 from the answer route flips the card to the same dead state a * cancel event produces (never a raw error), * - expired/withdrawn asks stay answerable: the answer is delivered as a NEW * chat turn via `onLateAnswer` (secret-bearing asks are blocked from that * path), * - one submit in flight at a time; a failed/timed-out submit stays * retryable. * * Pure data + callbacks: no fetch inside the component. Products bind the wire * via `createInteractionAnswerSubmitter` (or any `SubmitInteractionAnswer`). */ import { type ReactNode } from 'react'; import type { ChatInteraction, ChatInteractionStatus, ChatSelectField } from './chat-interactions'; import { type SubmitInteractionAnswer } from './interaction-card-support'; export type InteractionBadgeVariant = 'outline' | 'default' | 'destructive'; export declare function InteractionBadge({ variant, children }: { variant: InteractionBadgeVariant; children: string; }): import("react").JSX.Element; export declare function InteractionActionButton({ variant, onClick, disabled, children, }: { variant?: 'primary' | 'outline'; onClick: () => void; disabled?: boolean; children: string; }): import("react").JSX.Element; export interface QuestionOptionListProps { /** Radio/checkbox group name — unique per field so selection is isolated. */ groupName: string; /** Stable prefix for per-option input ids (label htmlFor pairing). */ idPrefix: string; options: ChatSelectField['options']; /** Checkbox (multi-select) vs radio (single). */ multi: boolean; selectedValues: string[]; disabled: boolean; onToggle: (value: string) => void; /** Terminal answered state: the selected rows highlight (primary edge, tint, * trailing check) so the card shows WHAT was answered, not just that it was. */ answered?: boolean; } /** The radio/checkbox option rows for a select field. Renders a fragment of * option `