import type { FontVariantToken } from '@uipath/apollo-core';
import type { SupportedLocale } from '../../../../i18n';
export type ApChatTheme = 'light' | 'light-hc' | 'dark' | 'dark-hc';
export declare enum AutopilotChatMode {
    Closed = "closed",
    SideBySide = "side-by-side",
    FullScreen = "full-screen",
    Embedded = "embedded"
}
export declare enum AutopilotChatFileType {
    Word = "Word",
    PowerPoint = "PowerPoint",
    File = "File"
}
export interface AutopilotChatFileInfo {
    name: string;
    type: string;
    size: number;
    lastModified: number;
    content: {
        text: string | null;
        binary: Uint8Array | null;
        base64: string | null;
    };
    loading?: boolean;
}
export interface AutopilotChatModelInfo {
    id: string;
    name: string;
    icon?: string;
    description: string | null;
}
export interface AutopilotChatAgentModeInfo {
    id: string;
    name: string;
    icon?: string;
    description?: string;
}
export interface AutopilotChatCustomHeaderAction {
    id: string;
    name: string;
    description?: string;
    icon?: string;
    children?: Array<Omit<AutopilotChatCustomHeaderAction, 'children'>>;
    disabled?: boolean;
}
export declare enum AutopilotChatRole {
    User = "user",
    Assistant = "assistant"
}
export interface AutopilotChatMessage {
    id: string;
    content: string;
    created_at: string;
    role: AutopilotChatRole;
    widget: string;
    attachments?: AutopilotChatFileInfo[];
    contentParts?: ContentPart[];
    hijacked?: boolean;
    fakeStream?: boolean;
    stream?: boolean;
    done?: boolean;
    actions?: AutopilotChatMessageAction[];
    feedback?: {
        isPositive: boolean;
    };
    groupId?: string;
    meta?: any;
    toCopy?: string;
    shouldWaitForMoreMessages?: boolean;
    disableActions?: boolean;
}
export interface AutopilotChatPrompt extends Pick<AutopilotChatMessage, 'content' | 'attachments'> {
}
export interface AutopilotChatMessageRenderer {
    name: string;
    render: (container: HTMLElement, message: AutopilotChatMessage) => void | (() => void);
}
export type AutopilotChatErrorLevel = 'error' | 'warn';
export interface AutopilotChatError {
    message: string;
    level: AutopilotChatErrorLevel;
}
export declare enum AutopilotChatEvent {
    Error = "error",
    NewChat = "newChat",
    ModeChange = "modeChange",
    SetPrompt = "setPrompt",
    Request = "request",
    Response = "response",
    StopResponse = "stopResponse",
    SetDefaultLoadingMessages = "setDefaultLoadingMessages",
    SetLoadingMessage = "setLoadingMessage",
    SetFirstRunExperience = "setFirstRunExperience",
    SetDisabledFeatures = "setDisabledFeatures",
    SetOverrideLabels = "setOverrideLabels",
    Open = "open",
    Close = "close",
    SendChunk = "sendChunk",
    SetConversation = "setConversation",
    SetHistory = "setHistory",
    DeleteConversation = "deleteConversation",
    OpenConversation = "openConversation",
    Feedback = "feedback",
    Copy = "copy",
    SetModels = "setModels",
    SetSelectedModel = "setSelectedModel",
    SetAgentModes = "setAgentModes",
    ConversationLoadMore = "conversationLoadMore",
    HistoryLoadMore = "historyLoadMore",
    HistorySearch = "historySearch",
    Attachments = "attachments",
    SetAttachments = "setAttachments",
    InputStream = "inputStream",
    OutputStream = "outputStream",
    SetSelectedAgentMode = "setSelectedAgentMode",
    SetCustomHeaderActions = "setCustomHeaderActions",
    CustomHeaderActionClicked = "customHeaderActionClicked",
    SetReadOnly = "setReadOnly",
    SetResourceManager = "setResourceManager",
    ResourceItemSelected = "resourceItemSelected",
    SpeechToTextToggle = "speechToTextToggle",
    SetSpeechToTextState = "setSpeechToTextState"
}
export declare enum AutopilotChatInterceptableEvent {
    Request = "request"
}
export declare enum AutopilotChatInternalEvent {
    ChatResize = "chatResize",
    ScrollToBottom = "scrollToBottom",
    ToggleHistory = "toggleHistory",
    ToggleSettings = "toggleSettings",
    UseLocalHistory = "useLocalHistory",
    SetAllowedAttachments = "setAllowedAttachments",
    ToggleAutoScroll = "toggleAutoScroll",
    SetIsLoadingMoreMessages = "setIsLoadingMoreMessages",
    SetShowLoading = "setShowLoading",
    ShouldShowLoadingMoreMessages = "shouldShowLoadingMoreMessages",
    PrependOlderMessages = "prependOlderMessages",
    ShowLoadingState = "showLoadingState",
    SetWaiting = "setWaiting",
    SetSuggestions = "setSuggestions",
    SetSpacing = "setSpacing",
    SetAttachmentsLoading = "setAttachmentsLoading",
    SetInputFocused = "setInputFocused",
    SetTheming = "setTheming",
    SetLocale = "setLocale",
    SetTheme = "setTheme",
    SetIsLoadingMoreHistory = "setIsLoadingMoreHistory",
    ShouldShowLoadingMoreHistory = "shouldShowLoadingMoreHistory",
    AppendOlderHistory = "appendOlderHistory"
}
export type AutopilotChatEventHandler<T = any> = (data?: T) => void;
export type AutopilotChatEventInterceptor<T = any> = (data?: T) => boolean | Promise<boolean> | void;
export interface AutopilotChatSuggestion {
    label: string;
    prompt: string;
}
export interface ContentPart {
    text?: string;
    citations?: Array<UrlCitation | PdfCitation>;
}
export interface ContentPartChunk {
    index: number;
    text?: string;
    citation?: UrlCitation | PdfCitation;
}
export interface Citation {
    id: number;
    title: string;
}
export interface UrlCitation extends Citation {
    url: string;
}
export interface PdfCitation extends Citation {
    download_url: string;
    page_number: number;
}
export interface AutopilotChatDisabledFeatures {
    resize?: boolean;
    fullScreen?: boolean;
    attachments?: boolean;
    history?: boolean;
    header?: boolean;
    headerSeparator?: boolean;
    footer?: boolean;
    preview?: boolean;
    close?: boolean;
    newChat?: boolean;
    settings?: boolean;
    audio?: boolean;
    feedback?: boolean;
    fullHeight?: boolean;
    copy?: boolean;
    htmlPreview?: boolean;
    audioStreaming?: boolean;
}
export interface AutopilotChatOverrideLabels {
    inputPlaceholder?: string;
    footerDisclaimer?: string;
    title?: string;
}
export declare enum AutopilotChatPreHookAction {
    NewChat = "new-chat",
    ToggleHistory = "toggle-history",
    ToggleSettings = "toggle-settings",
    ToggleChat = "toggle-chat",
    CloseChat = "close-chat",
    CitationClick = "citation-click",
    Feedback = "feedback",
    DeleteConversation = "delete-conversation"
}
export interface AutopilotChatConfiguration {
    mode: AutopilotChatMode;
    embeddedContainer?: HTMLElement;
    locale?: SupportedLocale;
    theme?: ApChatTheme;
    disabledFeatures?: AutopilotChatDisabledFeatures;
    overrideLabels?: AutopilotChatOverrideLabels;
    firstRunExperience?: {
        title: string;
        description: string;
        suggestions?: AutopilotChatSuggestion[];
        sendOnClick?: boolean;
    };
    useLocalHistory?: boolean;
    allowedAttachments?: AutopilotChatAllowedAttachments;
    models?: AutopilotChatModelInfo[];
    selectedModel?: AutopilotChatModelInfo;
    agentModes?: AutopilotChatAgentModeInfo[];
    selectedAgentMode?: AutopilotChatAgentModeInfo;
    readOnly?: boolean;
    preHooks?: Partial<Record<AutopilotChatPreHookAction, (data?: any) => Promise<boolean>>>;
    paginatedMessages?: boolean;
    paginatedHistory?: boolean;
    settingsRenderer?: (container: HTMLElement) => void;
    paginatedResources?: boolean;
    resourceManager?: AutopilotChatResourceManager;
    theming?: {
        scrollBar?: {
            scrollThumbColor?: string;
            scrollHoverColor?: string;
            scrollSize?: string;
            scrollBorderRadius?: string;
        };
        chatMenu?: {
            groupItemTooltipPlacement?: 'top' | 'right' | 'bottom' | 'left';
        };
    };
    spacing?: {
        compactMode?: boolean;
        promptBox?: {
            minRows?: number;
            maxRows?: number;
        };
        messageSpacing?: number;
        messageGroupGap?: number;
        primaryFontToken?: FontVariantToken;
        primaryBoldFontToken?: FontVariantToken;
        titleFontToken?: FontVariantToken;
        suggestionSpacing?: number;
        suggestionFontToken?: FontVariantToken;
        suggestionPadding?: string;
        markdownTokens?: {
            li?: FontVariantToken;
            p?: FontVariantToken;
            h1?: FontVariantToken;
            h2?: FontVariantToken;
            h3?: FontVariantToken;
            h4?: FontVariantToken;
            h5?: FontVariantToken;
            h6?: FontVariantToken;
            th?: FontVariantToken;
            td?: FontVariantToken;
            em?: FontVariantToken;
            del?: FontVariantToken;
            strong?: FontVariantToken;
            link?: FontVariantToken;
            citation?: FontVariantToken;
        };
    };
}
export interface AutopilotChatHistory {
    id: string;
    name: string;
    timestamp: string;
}
export interface AutopilotChatMessageActionDetails {
    preHookAction?: AutopilotChatPreHookAction;
    isPositive?: boolean;
    [key: string]: any;
}
export interface AutopilotChatMessageAction {
    name: string;
    label: string;
    icon?: string;
    showInOverflow?: boolean;
    disabled?: boolean;
    eventName?: string;
    details?: AutopilotChatMessageActionDetails;
}
export interface AutopilotChatActionPayload {
    action: AutopilotChatMessageAction;
    message: AutopilotChatMessage;
    group: AutopilotChatMessage[];
}
export interface AutopilotChatAllowedAttachments {
    multiple: boolean;
    types: {
        [key: string]: string[];
    };
    maxSize: number;
    maxCount?: number;
}
export interface AutopilotChatInputStreamEvent {
    activityStart?: AutopilotChatInputStreamActivityStart;
    activityEnd?: AutopilotChatInputStreamActivityEnd;
    mediaChunks?: AutopilotChatInputStreamMediaChunk[];
}
export interface AutopilotChatInputStreamActivityStart {
    automaticActivityDetectionEnabled?: boolean;
}
export interface AutopilotChatInputStreamActivityEnd {
    sequenceNumber: number;
}
export interface AutopilotChatInputStreamMediaChunk extends AutopilotChatMediaChunk {
}
export interface AutopilotChatOutputStreamEvent {
    mediaChunks?: AutopilotChatOutputStreamMediaChunk[];
    interrupted?: boolean;
    generationComplete?: boolean;
    turnComplete?: boolean;
}
export interface AutopilotChatOutputStreamMediaChunk extends AutopilotChatMediaChunk {
}
export interface AutopilotChatMediaChunk {
    sequenceNumber: number;
    mimeType: string;
    data: string;
}
export interface AutopilotChatHistorySearchPayload {
    searchText: string;
}
export interface AutopilotChatResourceItem {
    id: string;
    type: string;
    displayName: string;
    icon?: string;
    tooltip?: string;
}
export interface AutopilotChatResourceItemSelector extends AutopilotChatResourceItem {
    hasNestedResources: boolean;
}
export interface AutopilotChatResourceResult {
    items: AutopilotChatResourceItem[];
    done?: boolean;
}
export interface AutopilotChatResourceSearchPayload {
    searchText?: string;
    skip?: number;
}
export interface AutopilotChatResourceManager {
    getTopLevelResources(): AutopilotChatResourceItemSelector[];
    getNestedResources(resourceId: string, options?: AutopilotChatResourceSearchPayload): Promise<AutopilotChatResourceResult>;
    globalSearch(options: AutopilotChatResourceSearchPayload): Promise<AutopilotChatResourceResult>;
    onResourceSelected?(item: AutopilotChatResourceItem): void;
}
//# sourceMappingURL=ChatModel.d.ts.map