import type { Dispatch, SetStateAction } from 'react';
import type { TChatMessage, TMessageContent } from "../types/messages.js";
import type { MessageRendererRegistry } from "../utils/messageTypeRegistry.js";
import { type Toolset, type ToolsetResultEvent } from "../utils/toolset/index.js";
export type UseToolsetOptions<TCustom extends TMessageContent = never> = {
    toolset: Toolset;
    setMessages: Dispatch<SetStateAction<TChatMessage<TCustom>[]>>;
    /** Existing registry to extend instead of starting from a fresh one. */
    registry?: MessageRendererRegistry;
};
export type UseToolsetReturn = {
    messageRendererRegistry: MessageRendererRegistry;
    handleToolResult: (event: ToolsetResultEvent) => void;
};
/**
 * Wire a toolset into the chat: returns a `MessageRendererRegistry` that
 * renders tool parts via the toolset and a `handleToolResult` callback
 * that merges results into history. To react to tool completion (e.g.
 * forward to the model), pair with `useToolResultContinuation`.
 *
 * Pass the same `toolset` reference across renders (e.g. via `useMemo` or
 * `createToolset`) so the registry stays stable.
 */
export declare function useToolset<TCustom extends TMessageContent = never>(options: UseToolsetOptions<TCustom>): UseToolsetReturn;
