export interface ChatImageData {
    base64: string;
    file: File;
    size: number;
    type: string;
    name: string;
}
export interface ChatImageRequestData {
    base64: string;
    size: number;
    type: string;
    name: string;
}
export interface ChatMessage {
    role: 'user' | 'assistant' | 'error' | 'wait' | 'streaming';
    content: string;
    timestamp: number;
    image?: string;
    images?: string[];
    customComponents?: Record<string, any>;
}
export type SizePreset = 'small' | 'medium' | 'large';
export interface PresetTask {
    id: string;
    title: string;
    description?: string;
    icon?: string;
}
export interface WelcomeConfig {
    avatar?: string;
    title: string;
    description: string;
    helpText?: string;
}
export interface AssistantConfig {
    avatar?: string;
    name?: string;
    description?: string;
}
export interface ChatInputCustomTool {
    id: string;
    toolName: string;
    icon?: string;
    clickCallback: (payload: {
        id: string;
        toolName: string;
        icon?: string;
        active: boolean;
        enableActive: boolean;
    }) => void;
    enableActive: boolean;
}
export interface AnnouncementConfig {
    title?: string;
    content: string;
    icon?: string;
    type?: 'info' | 'warning' | 'success' | 'error';
    showIcon?: boolean;
    dismissible?: boolean;
    action?: {
        link?: string;
        onClick?: () => void;
    };
}
export interface FeedbackImageData extends ChatImageData {
}
export interface FeedbackData {
    issue: string;
    description: string;
    images: FeedbackImageData[];
    contact: string;
}
export interface ChatCallbacks {
    onRequestEnd?: (response: any) => void;
    onUserMessage?: (message: string) => void;
    onAssistantMessage?: (message: string, res: any) => void;
    onError?: (error: any) => void;
    onClearHistory?: () => void;
    onPresetTaskClick?: (task: PresetTask) => void;
    onStreamData?: (data: {
        content: string;
        isEnd: boolean;
        messageIndex: number;
        accumulatedContent: string;
        raw?: any;
    }) => void;
    onImageSelect?: (imageData: ChatImageData) => void;
    onImageRemove?: (imageData?: ChatImageData) => void;
    clickAssistantMsgCallback?: (message: string, index: number, messageObj: ChatMessage) => void;
    onFeedbackSubmit?: (data: FeedbackData) => void;
}
export interface CustomRequestConfig {
    headers?: Record<string, string>;
    customParams?: Record<string, any>;
    requestParamProcessor?: (baseParams: any, customParams: any) => any;
    urlProcessor?: (baseUrl: string, params: any) => string;
    method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
    timeout?: number;
    retry?: {
        maxRetries: number;
        retryDelay: number;
        retryCondition?: (error: any) => boolean;
    };
}
export interface ChatPanelProps {
    url: string;
    appName: string;
    domainName: string;
    size?: SizePreset;
    maxHistoryCount?: number;
    contextHistoryCount?: number;
    enableContext?: boolean;
    enableLocalStorage?: boolean;
    storageKey?: string;
    enableStreaming?: boolean;
    enableImageUpload?: boolean;
    enableMultiImageUpload?: boolean;
    enableVoiceInput?: boolean;
    enableDeepThinking?: boolean;
    customTools?: ChatInputCustomTool[];
    enableInsertMessage?: boolean;
    showAvatar?: boolean;
    alignUserMessagesRight?: boolean;
    enableAutoSpeech?: boolean;
    unvalidateHistory?: boolean;
    supportedCustomContext?: boolean;
    disableInput?: boolean;
    customPlaceholder?: string;
    showTaskRunningBox?: boolean;
    taskRunningText?: string;
    enableFullscreenToggle?: boolean;
    showFullscreenButton?: boolean;
    isFullscreenMode?: boolean;
    __internalSuspendedBallMode?: boolean;
    title?: string;
    showHeader?: boolean;
    showCloseButton?: boolean;
    showClearButton?: boolean;
    showThemeToggle?: boolean;
    showFeedbackButton?: boolean;
    allowHistorySearch?: boolean;
    welcomeConfig?: WelcomeConfig;
    presetTasks?: PresetTask[];
    assistantConfig?: AssistantConfig;
    announcementConfig?: AnnouncementConfig;
    locales?: string | string[];
    options?: Intl.DateTimeFormatOptions;
    customRequestConfig?: CustomRequestConfig;
    maxInputLength?: number;
    callbacks?: ChatCallbacks;
}
export interface SuspendedBallChatProps {
    appName: string;
    domainName: string;
    url?: string;
    customRequestConfig?: CustomRequestConfig;
    maxInputLength?: number;
    size?: SizePreset;
    location?: 'left-top' | 'right-top' | 'left-bottom' | 'right-bottom' | 'left-center' | 'right-center' | 'top-center' | 'bottom-center' | 'center';
    customIconUrl?: string;
    maxHistoryCount?: number;
    contextHistoryCount?: number;
    enableContext?: boolean;
    enableLocalStorage?: boolean;
    storageKey?: string;
    enableStreaming?: boolean;
    enableImageUpload?: boolean;
    enableMultiImageUpload?: boolean;
    enableVoiceInput?: boolean;
    enableDeepThinking?: boolean;
    customTools?: ChatInputCustomTool[];
    enableInsertMessage?: boolean;
    showAvatar?: boolean;
    alignUserMessagesRight?: boolean;
    enableAutoSpeech?: boolean;
    unvalidateHistory?: boolean;
    supportedCustomContext?: boolean;
    disableInput?: boolean;
    customPlaceholder?: string;
    showTaskRunningBox?: boolean;
    taskRunningText?: string;
    enableFullscreenToggle?: boolean;
    title?: string;
    showHeader?: boolean;
    showCloseButton?: boolean;
    showClearButton?: boolean;
    showThemeToggle?: boolean;
    showFeedbackButton?: boolean;
    allowHistorySearch?: boolean;
    welcomeConfig?: WelcomeConfig;
    presetTasks?: PresetTask[];
    assistantConfig?: AssistantConfig;
    announcementConfig?: AnnouncementConfig;
    dateLocales?: string | string[];
    options?: Intl.DateTimeFormatOptions;
    callbacks?: ChatCallbacks;
}
export interface ChatPanelInstance {
    scrollToBottom: () => void;
    forceScrollToBottom: () => void;
    streamingScrollToBottom: () => void;
    handleRequestEnd: (content?: string) => void;
    handleMermaidInit: (content?: string) => void;
    getUiHistory: () => ChatMessage[];
    reloadUiHistory: () => Promise<ChatMessage[]>;
    setUiHistory: (nextUiHistory: ChatMessage[]) => void;
    sendMessage: (message: string) => void;
    getChatState: () => {
        isLocked: boolean;
        hasMessages: boolean;
        currentMessageCount: number;
        isStreaming: boolean;
    };
    clearHistory: () => void;
    stopRequest: () => void;
    isStreaming: () => boolean;
}
export interface SuspendedBallChatInstance {
    sendMessage: (message: string) => void;
    getChatState: () => {
        isLocked: boolean;
        hasMessages: boolean;
        currentMessageCount: number;
        isStreaming: boolean;
    };
    clearHistory: () => void;
    stopRequest: () => void;
    isStreaming: () => boolean;
    getUiHistory: () => ChatMessage[];
    reloadUiHistory: () => Promise<ChatMessage[]>;
    setUiHistory: (nextUiHistory: ChatMessage[]) => void;
    openPanel: () => void;
    closePanel: () => void;
    toggleFullscreenMode: () => void;
    isFullscreenMode: () => boolean;
    isPanelVisible: () => boolean;
}
export interface SpeechConfig {
    lang?: string;
    rate?: number;
    pitch?: number;
    volume?: number;
    onStart?: () => void;
    onEnd?: () => void;
    onPause?: () => void;
    onResume?: () => void;
}
export interface StorageInfo {
    enabled: boolean;
    key: string;
    size: string;
    count: number;
}
//# sourceMappingURL=index.d.ts.map