/**
 * useChat Hook
 * Main state management for chat functionality
 */
import type { ConversationMessage, WidgetConfig } from '../../types';
export interface UseChatOptions {
    widgetId: string;
    apiUrl: string;
    currentRoute?: string;
    onMessage?: (message: ConversationMessage) => void;
    onError?: (error: Error) => void;
    skipInitialization?: boolean;
}
export interface ConversationSummary {
    id: string;
    preview: string;
    lastMessageAt: string;
    messageCount: number;
    startedAt: string;
}
export interface UseChatReturn {
    messages: ConversationMessage[];
    isLoading: boolean;
    isTyping: boolean;
    error: string | null;
    config: WidgetConfig | null;
    conversationId: string;
    sendMessage: (content: string, files?: File[]) => Promise<void>;
    clearMessages: () => void;
    submitFeedback: (messageId: string, feedback: 'positive' | 'negative') => Promise<void>;
    dismissAction: (toolCallId: string) => Promise<void>;
    conversations: ConversationSummary[];
    loadConversations: () => void;
    switchConversation: (conversationId: string) => Promise<void>;
    startNewConversation: () => void;
    deleteConversation: (conversationId: string) => void;
    createDemoConversation: (userMessage: string, assistantMessage: string) => Promise<string | null>;
    /** Call an action endpoint directly (frontend-owned flow) */
    callActionEndpoint: <T = unknown>(actionId: string, endpoint: string, input: Record<string, unknown>, options?: {
        token?: string;
        toolCallId?: string;
    }) => Promise<T>;
}
export declare function useChat(options: UseChatOptions): UseChatReturn;
//# sourceMappingURL=index.d.ts.map