import { ModelSettings } from './types';
import { UIMessage } from '@ai-sdk/react';
import { MastraUIMessage } from '../lib/ai-sdk';
import { CoreUserMessage } from '@mastra/core/llm';
import { RequestContext } from '@mastra/core/request-context';
import { ChunkType, NetworkChunkType } from '@mastra/core/stream';
import { TracingOptions } from '@mastra/core/observability';
export interface MastraChatProps {
    agentId: string;
    resourceId?: string;
    initializeMessages?: () => MastraUIMessage[];
}
interface SharedArgs {
    coreUserMessages: CoreUserMessage[];
    requestContext?: RequestContext;
    threadId?: string;
    modelSettings?: ModelSettings;
    signal?: AbortSignal;
    tracingOptions?: TracingOptions;
}
export type SendMessageArgs = {
    message: string;
    coreUserMessages?: CoreUserMessage[];
} & (({
    mode: 'generate';
} & Omit<GenerateArgs, 'coreUserMessages'>) | ({
    mode: 'stream';
} & Omit<StreamArgs, 'coreUserMessages'>) | ({
    mode: 'network';
} & Omit<NetworkArgs, 'coreUserMessages'>) | ({
    mode?: undefined;
} & Omit<StreamArgs, 'coreUserMessages'>));
export type GenerateArgs = SharedArgs & {
    onFinish?: (messages: UIMessage[]) => Promise<void>;
};
export type StreamArgs = SharedArgs & {
    onChunk?: (chunk: ChunkType) => Promise<void>;
};
export type NetworkArgs = SharedArgs & {
    onNetworkChunk?: (chunk: NetworkChunkType) => Promise<void>;
};
export declare const useChat: ({ agentId, resourceId, initializeMessages }: MastraChatProps) => {
    setMessages: import('react').Dispatch<import('react').SetStateAction<MastraUIMessage[]>>;
    sendMessage: ({ mode, ...args }: SendMessageArgs) => Promise<void>;
    isRunning: boolean;
    messages: MastraUIMessage[];
    approveToolCall: (toolCallId: string) => Promise<void>;
    declineToolCall: (toolCallId: string) => Promise<void>;
    approveToolCallGenerate: (toolCallId: string) => Promise<void>;
    declineToolCallGenerate: (toolCallId: string) => Promise<void>;
    cancelRun: () => void;
    toolCallApprovals: {
        [toolCallId: string]: {
            status: "approved" | "declined";
        };
    };
    approveNetworkToolCall: (toolName: string, runId?: string) => Promise<void>;
    declineNetworkToolCall: (toolName: string, runId?: string) => Promise<void>;
    networkToolCallApprovals: {
        [toolName: string]: {
            status: "approved" | "declined";
        };
    };
};
export {};
