import * as _tanstack_react_query from '@tanstack/react-query';
import { ConversationWithMessages } from '../../query-keys.js';
import { S as SerializedConversation } from '../../../../shared/stack.Be1QIHEn.js';
export { a as SerializedMessage } from '../../../../shared/stack.Be1QIHEn.js';
import '@btst/stack/plugins/api';
import 'better-call';
import 'zod/v4/core';
import 'zod';
import 'ai';
import '@btst/stack/plugins/client';

/**
 * Options for the useConversations hook
 */
interface UseConversationsOptions {
    /** Whether to enable the query (default: true) */
    enabled?: boolean;
}
/**
 * Result from the useConversations hook
 */
interface UseConversationsResult {
    /** Array of conversations */
    conversations: SerializedConversation[];
    /** Whether the initial load is in progress */
    isLoading: boolean;
    /** Error if the query failed */
    error: Error | null;
    /** Function to refetch the conversations */
    refetch: () => void;
}
/**
 * Hook for fetching all conversations
 */
declare function useConversations(options?: UseConversationsOptions): UseConversationsResult;
/**
 * Suspense variant of useConversations
 */
declare function useSuspenseConversations(): {
    conversations: SerializedConversation[];
    refetch: () => Promise<unknown>;
};
/**
 * Options for the useConversation hook
 */
interface UseConversationOptions {
    /** Whether to enable the query (default: true) */
    enabled?: boolean;
}
/**
 * Result from the useConversation hook
 */
interface UseConversationResult {
    /** The conversation with messages, or null if not found */
    conversation: ConversationWithMessages | null;
    /** Whether the conversation is being loaded */
    isLoading: boolean;
    /** Error if the query failed */
    error: Error | null;
    /** Function to refetch the conversation */
    refetch: () => void;
}
/**
 * Hook for fetching a single conversation with messages
 */
declare function useConversation(id?: string, options?: UseConversationOptions): UseConversationResult;
/**
 * Suspense variant of useConversation
 */
declare function useSuspenseConversation(id: string): {
    conversation: ConversationWithMessages | null;
    refetch: () => Promise<unknown>;
};
/**
 * Hook for creating a new conversation
 */
declare function useCreateConversation(): _tanstack_react_query.UseMutationResult<SerializedConversation | null, Error, {
    id?: string;
    title?: string;
}, unknown>;
/**
 * Hook for renaming a conversation
 */
declare function useRenameConversation(): _tanstack_react_query.UseMutationResult<SerializedConversation | null, Error, {
    id: string;
    title: string;
}, unknown>;
/**
 * Hook for deleting a conversation
 */
declare function useDeleteConversation(): _tanstack_react_query.UseMutationResult<{
    success: boolean;
}, Error, {
    id: string;
}, unknown>;

export { ConversationWithMessages, SerializedConversation, useConversation, useConversations, useCreateConversation, useDeleteConversation, useRenameConversation, useSuspenseConversation, useSuspenseConversations };
export type { UseConversationOptions, UseConversationResult, UseConversationsOptions, UseConversationsResult };
