/**
 * @file ChatToolCalls.tsx
 * @input Uses React, StyleX, theme tokens
 * @output Exports ChatToolCalls component
 * @position Chat component — displays tool/function call invocations
 *
 * Single component that handles both individual and grouped tool calls.
 * Accepts an array of call data matching the shape LLM APIs already return.
 * Single call renders inline; multiple calls get a collapsible summary.
 *
 * Design rationale: every LLM API (Vercel AI SDK, Anthropic, OpenAI)
 * returns tool calls as an array on the message. One component with a
 * data prop matches that shape directly — no nested compound components
 * for builders to wire up.
 */
import React, { type ReactNode } from 'react';
import type { BaseProps } from '../BaseProps';
export type ChatToolCallStatus = 'pending' | 'running' | 'complete' | 'error';
export interface ChatToolCallItem {
    /** Tool/function name. */
    name: string;
    /** Current execution status. @default 'complete' */
    status?: ChatToolCallStatus;
    /** The target of the action (e.g. "Button.tsx", "yarn test", "CSS anchor positioning"). */
    target?: string;
    /** Duration string (e.g. "1.2s", "340ms"). Shown when complete. */
    duration?: string;
    /** Sandbox/node name (e.g. "navi", "xds"). Shown as a pill badge. */
    node?: string;
    /** Lines/characters added. Rendered in green (e.g. "+12"). */
    additions?: number;
    /** Lines/characters removed. Rendered in red (e.g. "-3"). */
    deletions?: number;
    /** Additional info rendered after the label. Free-form ReactNode. */
    stats?: ReactNode;
    /**
     * Error message when status is 'error'. Rendered as visually hidden text in
     * the row (so screen readers and keyboard users perceive it) and echoed in a
     * hover tooltip on the status icon.
     */
    errorMessage?: string;
    /** Unique key for React list rendering. Derived from stable metadata if omitted. */
    key?: string;
    /** Arbitrary data passed through to renderDetail. Store tool args, result, etc. */
    data?: unknown;
    /** Inline detail content shown when the row is expanded (e.g. code diff, command output). */
    resultDetail?: ReactNode;
}
export interface ChatToolCallsProps extends BaseProps<HTMLDivElement> {
    ref?: React.Ref<HTMLDivElement>;
    /** Array of tool call data. */
    calls: ChatToolCallItem[];
    /** Custom summary label for groups. Auto-generated from count if omitted. */
    label?: string;
    /** Whether the group is expanded. Uncontrolled by default. */
    isExpanded?: boolean;
    /** Default expanded state. @default true for ≤3 calls, false for >3. */
    defaultIsExpanded?: boolean;
    /** Callback when expanded state changes. */
    onExpandedChange?: (isExpanded: boolean) => void;
}
/**
 * Displays tool/function call invocations from an LLM response.
 *
 * Accepts a `calls` array matching the shape LLM APIs return. Single call
 * renders inline without group chrome. Multiple calls get a collapsible
 * summary header.
 *
 * @example
 * ```
 * <ChatToolCalls
 *   calls={message.toolCalls.map(tc => ({
 *     name: tc.toolName,
 *     status: tc.state,
 *     duration: tc.duration,
 *   }))}
 *   renderDetail={(call) => (
 *     <CodeBlock code={call.args} language="json" />
 *   )}
 * />
 * ```
 */
export declare function ChatToolCalls(props: ChatToolCallsProps): React.JSX.Element | null;
export declare namespace ChatToolCalls {
    var displayName: string;
}
//# sourceMappingURL=ChatToolCalls.d.ts.map