import "./clarify_wizard.css"; import type * as React from "react"; import { useRender } from "@base-ui/react/use-render"; import { type StyleProps } from "./style_props"; export interface ClarifyOption { value: string; label: string; /** REQUIRED for a clarify answer: the one-line "what this choice means" so the * human can pick without re-deriving it from the question. */ description: string; } export interface ClarifyWizardQuestion { question: string; answers: ClarifyOption[]; /** Offer an "Other…" free-text answer for this question. */ allowCustom?: boolean; } export interface ClarifyWizardAnswer { /** The chosen option's value, or the custom free text. */ value: string; /** True when the value came from the "Other…" row (not one of the options). */ custom: boolean; } export interface ClarifyWizardProps extends StyleProps { questions: ClarifyWizardQuestion[]; /** Fires when every question is answered and the human submits — one answer * per question, aligned by index. */ onSubmit: (answers: ClarifyWizardAnswer[]) => void; onCancel: () => void; testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * The compound frame for a wizard whose actions live in the dialog's footer — * the dialog grammar's home for action bars. Wrap the `Dialog` from OUTSIDE * (where the review would sit), put the `ClarifyWizard` in the content pane * and `ClarifyWizardActions` in the `DialogFooter`; the wizard then suppresses * its inline action row and drives the bar through this frame. One wizard per * frame. Standalone `ClarifyWizard` (no frame — e.g. riding a parked run's * stream, where no footer exists) keeps its inline actions. */ export declare function ClarifyWizardDialog({ children }: { children: React.ReactNode; }): React.JSX.Element; /** * THE AGENT ASKING BACK — a run of questions the human works through one at a * time, each with selectable answers carrying a one-line description, freely * switchable until submitted. Back / Next / Cancel / Submit, with the position * as an overline over the question; you can only advance once the current * question is answered, and Submit fires when the last is. ONE question is a run * of length one: the position overline and the Next are both absent, so a single * ask reads as the plain question it is. A borderless block, not a card — the * question rides whatever surface the run is on, and a second edge around it * would read as a separate thing to answer. * * Human-in-the-loop: when unsure, the agent clarifies instead of guessing wrong. * Pair with `AgentRun`. Inside a `ClarifyWizardDialog`, the action row moves to * `ClarifyWizardActions`. */ export declare function ClarifyWizard(props: ClarifyWizardProps): React.ReactElement>; export interface ClarifyWizardActionsProps extends StyleProps { testID?: string; ref?: React.Ref; render?: useRender.RenderProp; } /** * The wizard's action bar for a `DialogFooter` — Cancel bottom-left, * Back + Next/Submit right, the same verbs and gating as the inline row. * Requires a `ClarifyWizardDialog` ancestor; renders nothing until its * `ClarifyWizard` mounts (so a multi-phase dialog can keep the footer JSX * conditional on the clarify phase alone). * * It IS the wizard's `actions` part wherever it is mounted (theming.md §3), so * one selector reaches the bar in both placements. */ export declare function ClarifyWizardActions(props: ClarifyWizardActionsProps): React.JSX.Element | null;