import { AutopilotChatInternalService } from './ChatInternalService';
import type { AutopilotChatAgentModeInfo, AutopilotChatAllowedAttachments, AutopilotChatConfiguration, AutopilotChatCustomHeaderAction, AutopilotChatDisabledFeatures, AutopilotChatError, AutopilotChatErrorLevel, AutopilotChatEventHandler, AutopilotChatEventInterceptor, AutopilotChatFileInfo, AutopilotChatHistory, AutopilotChatInputStreamEvent, AutopilotChatMessage, AutopilotChatMessageRenderer, AutopilotChatModelInfo, AutopilotChatOutputStreamEvent, AutopilotChatOverrideLabels, AutopilotChatPreHookAction, AutopilotChatPrompt, AutopilotChatResourceManager, AutopilotChatSuggestion, ContentPartChunk } from './ChatModel';
import { AutopilotChatEvent, AutopilotChatInterceptableEvent, AutopilotChatMode } from './ChatModel';
export declare class AutopilotChatService {
    private static _instances;
    private _initialConfig;
    private _config;
    private _eventBus;
    private _messageRenderers;
    private _eventUnsubscribers;
    private _conversation;
    private _error;
    private _prompt;
    private _history;
    private _historyOpen;
    private _settingsOpen;
    private _activeConversationId;
    private _defaultLoadingMessages;
    private _loadingMessage;
    private _loadingMessageDuration;
    private _internalService;
    private _groupId?;
    private _instanceName;
    private _contentPartBuilders;
    private _customHeaderActions;
    private _getChatModeKey;
    private _locale;
    private _theme;
    private _resourceManager;
    private _isSpeechToTextActive;
    private constructor();
    static Instantiate({ instanceName, config, messageRenderers, }: {
        instanceName?: string;
        config?: AutopilotChatConfiguration;
        messageRenderers?: AutopilotChatMessageRenderer[];
    }): AutopilotChatService;
    static getInstance(instanceName?: string): AutopilotChatService | undefined;
    get activeConversationId(): string | null;
    getConfig(): AutopilotChatConfiguration;
    setGetChatModeKey(getChatModeKey: (_instanceName?: string) => string): void;
    initialize(config: AutopilotChatConfiguration, messageRenderers?: AutopilotChatMessageRenderer[]): void;
    patchConfig(config: Partial<AutopilotChatConfiguration>, messageRenderers?: AutopilotChatMessageRenderer[]): void;
    injectMessageRenderer(renderer: AutopilotChatMessageRenderer): void;
    getMessageRenderer(name: string): AutopilotChatMessageRenderer | undefined;
    renderMessage(container: HTMLElement, message: AutopilotChatMessage): void | (() => void);
    open(config?: Partial<AutopilotChatConfiguration>, messageRenderers?: AutopilotChatMessageRenderer[]): void;
    close(): void;
    setChatMode(mode: AutopilotChatMode, persist?: boolean): void;
    setDisabledFeatures(features: AutopilotChatDisabledFeatures): void;
    setOverrideLabels(labels: AutopilotChatOverrideLabels): void;
    setFirstRunExperience(config: AutopilotChatConfiguration['firstRunExperience']): void;
    setPrompt(prompt: AutopilotChatPrompt | string): void;
    setShowLoading(showLoading: boolean): void;
    setWaiting(waiting: boolean): void;
    getPrompt(): string | AutopilotChatPrompt | undefined;
    setSuggestions(suggestions: AutopilotChatSuggestion[], sendOnClick?: boolean): void;
    setConversation(messages: AutopilotChatMessage[]): void;
    prependOlderMessages(messages?: AutopilotChatMessage[], done?: boolean): void;
    appendOlderHistoryItems(items?: AutopilotChatHistory[], done?: boolean): void;
    getConversation(): AutopilotChatMessage[];
    sendRequest(request: Omit<AutopilotChatMessage, 'role' | 'id' | 'created_at' | 'widget' | 'fakeStream'> & {
        id?: string;
        created_at?: string;
    }): void;
    stopResponse(): void;
    sendResponse(response: Omit<AutopilotChatMessage, 'role' | 'id' | 'content'> & {
        id?: string;
        content?: string;
        contentPartChunk?: ContentPartChunk;
    }): void;
    setDefaultLoadingMessages(messages: string[], duration?: number): void;
    getDefaultLoadingMessages(): string[] | null;
    getLoadingMessageDuration(): number | null;
    setLoadingMessage(message: string): void;
    getLoadingMessage(): string | null;
    newChat(config?: AutopilotChatConfiguration): void;
    setError(message: string | undefined, level?: AutopilotChatErrorLevel): void;
    clearError(): void;
    getError(): AutopilotChatError | undefined;
    on(event: AutopilotChatEvent, handler: AutopilotChatEventHandler): () => void;
    intercept(event: AutopilotChatInterceptableEvent, interceptor: AutopilotChatEventInterceptor): () => void;
    setHistory(history: AutopilotChatHistory[], done?: boolean): void;
    getHistory(): AutopilotChatHistory[];
    get historyOpen(): boolean;
    get settingsOpen(): boolean;
    toggleHistory(open?: boolean): void;
    toggleSettings(open?: boolean): void;
    deleteConversation(conversationId: string): void;
    openConversation(conversationId: string | null, showLoadingState?: boolean): void;
    setAllowedAttachments(allowedAttachments: AutopilotChatAllowedAttachments): void;
    toggleAutoScroll(autoScroll: boolean): void;
    setModels(models: AutopilotChatModelInfo[]): void;
    getModels(): AutopilotChatModelInfo[] | undefined;
    setSelectedModel(modelId: string): void;
    getSelectedModel(): AutopilotChatModelInfo | undefined;
    setAgentModes(agentModes: AutopilotChatAgentModeInfo[]): void;
    getAgentModes(): AutopilotChatAgentModeInfo[] | undefined;
    setAgentMode(modeId: string): void;
    getAgentMode(): AutopilotChatAgentModeInfo | undefined;
    setCustomHeaderActions(actions: AutopilotChatCustomHeaderAction[]): void;
    getCustomHeaderActions(): AutopilotChatCustomHeaderAction[];
    setLocale(locale: string): void;
    getLocale(): string;
    setTheme(theme: string): void;
    getTheme(): string;
    setResourceManager(resourceManager: AutopilotChatResourceManager): void;
    getResourceManager(): AutopilotChatResourceManager | undefined;
    setReadOnly(readOnly: boolean): void;
    getReadOnly(): boolean;
    get __internalService__(): AutopilotChatInternalService;
    getMessagesInGroup(groupId: string): AutopilotChatMessage[];
    setPreHook(action: AutopilotChatPreHookAction, hook: (data?: any) => Promise<boolean>): void;
    getPreHook(action: AutopilotChatPreHookAction): (data?: any) => Promise<boolean>;
    sendInputStreamEvent(event: AutopilotChatInputStreamEvent): void;
    sendOutputStreamEvent(event: AutopilotChatOutputStreamEvent): void;
    publishSpeechToTextToggle(): void;
    setSpeechToTextState(isActive: boolean): void;
    get isSpeechToTextActive(): boolean;
    setAttachmentsLoading(attachments: AutopilotChatFileInfo[]): void;
    private _accumulateContentPart;
    private _getAccumulatedContent;
    private _clearAccumulatedContent;
    private _processContentPartChunk;
}
//# sourceMappingURL=ChatService.d.ts.map