import { PermittedErrorMessage } from '../../../types/permittedErrorMessage';
import { MessageFile, MessageFileType } from '../../../types/messageFile';
import { ServiceIO } from '../../../services/serviceIO';
import { Result as MessageData } from '../../../types/result';
import { AiAssistant } from '../../../aiAssistant';
import { ErrorMessageOverrides, MessageElementsStyles, MessageRoleStyles, MessageContent, MessageStyles } from '../../../types/messages';
export interface MessageElements {
    outerContainer: HTMLElement;
    innerContainer: HTMLElement;
    bubbleElement: HTMLElement;
}
export declare class Messages {
    elementRef: HTMLElement;
    readonly messageStyles?: MessageStyles;
    private readonly _messageElementRefs;
    private readonly _avatars?;
    private readonly _names?;
    private readonly _errorMessageOverrides?;
    private readonly _onNewMessage?;
    private readonly _dispatchEvent;
    private readonly _speechOutput?;
    private readonly _displayLoadingMessage?;
    private readonly _remarkable;
    private readonly _permittedErrorPrefixes?;
    private _introPanel?;
    private _streamedText;
    messages: MessageContent[];
    constructor(aiAssistant: AiAssistant, serviceIO: ServiceIO, panel?: HTMLElement);
    private prepareDemo;
    private static createContainerElement;
    private addIntroductoryMessage;
    private populateInitialMessages;
    applyCustomStyles(elements: MessageElements, isAI: boolean, media: boolean, otherStyles?: MessageRoleStyles | MessageElementsStyles): void;
    private addInnerContainerElements;
    static createMessageContent(isAI: boolean, text?: string, file?: MessageFile): MessageContent;
    private static createBaseElements;
    private createMessageElements;
    createNewMessageElement(text: string, isAI: boolean): MessageElements;
    private createAndAppendNewMessageElement;
    private static editEmptyMessageElement;
    private addNewTextMessage;
    addNewMessage(data: MessageData, isAI: boolean, update: boolean, isInitial?: boolean): void;
    sendClientUpdate(message: MessageContent, isInitial?: boolean): void;
    private removeMessageOnError;
    addNewErrorMessage(type: keyof Omit<ErrorMessageOverrides, 'default'>, message?: string | PermittedErrorMessage): void;
    private static checkPermittedErrorPrefixes;
    private getPermittedMessage;
    addLoadingMessage(): void;
    addNewStreamedMessage(): HTMLElement;
    updateStreamedMessage(text: string, bubbleElement: HTMLElement): void;
    finaliseStreamedMessage(): void;
    private populateIntroPanel;
    addMultipleFiles(filesData: {
        file: File;
        type: MessageFileType;
    }[]): Promise<unknown[]>;
}
//# sourceMappingURL=messages.d.ts.map