import type { ToolCallLogEntry, ToolCallState } from '../../../types/ToolCall';
import type { TODO_any } from '../../../utils/organization/TODO_any';
import type { ChatMessage } from '../types/ChatMessage';
import type { RunBrowserToolArtifact, RunBrowserToolError } from '../utils/toolCallParsing/RunBrowserToolResult';
/**
 * One browser tool call rendered in the replay modal.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type RunBrowserToolCall = NonNullable<ChatMessage['toolCalls']>[number];
/**
 * Rendering options needed to derive browser replay state.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type ResolveRunBrowserToolCallDetailsStateOptions = {
    /**
     * Tool call being rendered.
     */
    toolCall: RunBrowserToolCall;
    /**
     * Parsed tool call arguments.
     */
    args: Record<string, TODO_any>;
    /**
     * Parsed tool result payload.
     */
    resultRaw: TODO_any;
};
/**
 * Current visual state rendered for one browser action row in the modal.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type BrowserActionRowState = 'pending' | 'running' | 'complete' | 'error';
/**
 * One browser action row rendered in the simple browser-tool view.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type BrowserActionRow = {
    /**
     * Stable row key.
     */
    key: string;
    /**
     * Human-readable action summary.
     */
    label: string;
    /**
     * Current action state.
     */
    state: BrowserActionRowState;
};
/**
 * One metadata row rendered in the browser replay summary block.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type RunBrowserMetaItem = {
    /**
     * Stable key for React rendering.
     */
    key: string;
    /**
     * User-facing row label.
     */
    label: string;
    /**
     * User-facing row value.
     */
    value: string;
    /**
     * Optional link target when the value is a URL.
     */
    href?: string;
};
/**
 * Fully derived browser replay state consumed by render helpers.
 *
 * @private type of resolveRunBrowserToolCallDetailsState
 */
type RunBrowserToolCallDetailsState = {
    /**
     * Original tool call currently being rendered.
     */
    toolCall: RunBrowserToolCall;
    /**
     * Resolved lifecycle state of the tool call snapshot.
     */
    toolCallState: ToolCallState;
    /**
     * Metadata rows shown at the top of the replay UI.
     */
    metaItems: Array<RunBrowserMetaItem>;
    /**
     * Browser-session log entry surfaced as a status banner.
     */
    browserReadyLog: ToolCallLogEntry | null;
    /**
     * Parsed browser warning message, when present.
     */
    warning: string | null;
    /**
     * Parsed fallback extracted content, when present.
     */
    fallbackContent: string | null;
    /**
     * Parsed browser error, when present.
     */
    runBrowserError: RunBrowserToolError | null;
    /**
     * Visual artifacts captured during the browser session.
     */
    artifacts: Array<RunBrowserToolArtifact>;
    /**
     * Ordered action rows combining requested actions, streamed logs, and final summaries.
     */
    actionRows: Array<BrowserActionRow>;
    /**
     * Indicates that the visual replay placeholder should be shown.
     */
    isVisualReplayPending: boolean;
    /**
     * Indicates that the empty visual replay state should be shown.
     */
    isVisualReplayEmpty: boolean;
    /**
     * Indicates that the action-plan placeholder should be shown.
     */
    isActionPlanPending: boolean;
    /**
     * Indicates that a streaming issue notice should be shown below the sections.
     */
    isStreamingErrorNoticeVisible: boolean;
};
/**
 * Resolves all derived state needed by `renderRunBrowserToolCallDetails`.
 *
 * @param options - Raw browser tool-call data.
 * @returns Derived state ready for focused render helpers.
 *
 * @private function of renderRunBrowserToolCallDetails
 */
export declare function resolveRunBrowserToolCallDetailsState(options: ResolveRunBrowserToolCallDetailsStateOptions): RunBrowserToolCallDetailsState;
export {};
