/*!
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */
/**
 * @fileoverview
 * The Messager class serves as a communication bridge between the MynahUI chat interface
 * and the host application (e.g., IDE extension). It translates UI events into standardized
 * messages, handles telemetry collection, and provides a clean abstraction layer for sending
 * different types of messages through the OutboundChatApi.
 */
import { AuthFollowUpClickedParams, CopyCodeToClipboardParams, ErrorParams, ErrorResult, InsertToCursorPositionParams, SendToPromptParams, TriggerType } from '@aws/chat-client-ui-types';
import { ButtonClickParams, ChatParams, ConversationAction, ConversationClickParams, CreatePromptParams, FeedbackParams, FileClickParams, FilterValue, FollowUpClickParams, GetSerializedChatResult, InfoLinkClickParams, LinkClickParams, ListConversationsParams, ListRulesParams, ListMcpServersParams, McpServerClickParams, OpenFileDialogParams, OpenTabResult, PinnedContextParams, PromptInputOptionChangeParams, QuickActionParams, RuleClickParams, SourceLinkClickParams, TabAddParams, TabBarActionParams, TabChangeParams, TabRemoveParams, ListAvailableModelsParams } from '@aws/language-server-runtimes-types';
import { TelemetryParams } from '../contracts/serverContracts';
import { VoteParams } from '../contracts/telemetry';
/**
 * OutboundChatApi defines the interface for sending messages from the chat client
 * to the host application. It provides methods for all supported outbound events.
 */
export interface OutboundChatApi {
    sendChatPrompt(params: ChatParams): void;
    sendQuickActionCommand(params: QuickActionParams): void;
    tabAdded(params: TabAddParams): void;
    tabChanged(params: TabChangeParams): void;
    tabRemoved(params: TabRemoveParams): void;
    telemetry(params: TelemetryParams): void;
    insertToCursorPosition(params: InsertToCursorPositionParams): void;
    copyToClipboard(params: CopyCodeToClipboardParams): void;
    authFollowUpClicked(params: AuthFollowUpClickedParams): void;
    followUpClicked(params: FollowUpClickParams): void;
    sendFeedback(params: FeedbackParams): void;
    linkClick(params: LinkClickParams): void;
    sourceLinkClick(params: SourceLinkClickParams): void;
    infoLinkClick(params: InfoLinkClickParams): void;
    uiReady(): void;
    disclaimerAcknowledged(): void;
    chatPromptOptionAcknowledged(messageId: string): void;
    onOpenTab(requestId: string, result: OpenTabResult | ErrorResult): void;
    createPrompt(params: CreatePromptParams): void;
    fileClick(params: FileClickParams): void;
    listConversations(params: ListConversationsParams): void;
    conversationClick(params: ConversationClickParams): void;
    mcpServerClick(params: McpServerClickParams): void;
    listMcpServers(params: ListMcpServersParams): void;
    tabBarAction(params: TabBarActionParams): void;
    onGetSerializedChat(requestId: string, result: GetSerializedChatResult | ErrorResult): void;
    promptInputOptionChange(params: PromptInputOptionChangeParams): void;
    promptInputButtonClick(params: ButtonClickParams): void;
    stopChatResponse(tabId: string): void;
    sendButtonClickEvent(params: ButtonClickParams): void;
    onOpenSettings(settingKey: string): void;
    onRuleClick(params: RuleClickParams): void;
    listRules(params: ListRulesParams): void;
    onAddPinnedContext(params: PinnedContextParams): void;
    onRemovePinnedContext(params: PinnedContextParams): void;
    onListAvailableModels(params: ListAvailableModelsParams): void;
    onOpenFileDialogClick(params: OpenFileDialogParams): void;
    onFilesDropped(params: {
        tabId: string;
        files: FileList;
        insertPosition: number;
    }): void;
}
export declare class Messager {
    private readonly chatApi;
    constructor(chatApi: OutboundChatApi);
    onTabAdd: (tabId: string, triggerType?: TriggerType, restoredTab?: boolean) => void;
    onRuleClick: (params: RuleClickParams) => void;
    onTabChange: (tabId: string) => void;
    onTabRemove: (tabId: string) => void;
    onUiReady: () => void;
    onDisclaimerAcknowledged: () => void;
    onChatPromptOptionAcknowledged: (messageId: string) => void;
    onFocusStateChanged: (focusState: boolean) => void;
    onSendToPrompt: (params: SendToPromptParams, tabId: string) => void;
    onChatPrompt: (params: ChatParams, triggerType?: string) => void;
    onQuickActionCommand: (params: QuickActionParams) => void;
    onInsertToCursorPosition: (params: InsertToCursorPositionParams) => void;
    onAuthFollowUpClicked: (params: AuthFollowUpClickedParams) => void;
    onFollowUpClicked: (params: FollowUpClickParams) => void;
    onCopyCodeToClipboard: (params: CopyCodeToClipboardParams) => void;
    onVote: (params: VoteParams) => void;
    onSendFeedback: (params: FeedbackParams) => void;
    onLinkClick: (params: LinkClickParams) => void;
    onSourceLinkClick: (params: SourceLinkClickParams) => void;
    onInfoLinkClick: (params: InfoLinkClickParams) => void;
    onError: (params: ErrorParams) => void;
    onOpenTab: (requestId: string, result: OpenTabResult | ErrorResult) => void;
    onCreatePrompt: (params: CreatePromptParams) => void;
    onFileClick: (params: FileClickParams) => void;
    onListConversations: (filter?: Record<string, FilterValue>, tabButtonClicked?: boolean) => void;
    onListRules: (params: ListRulesParams) => void;
    onConversationClick: (conversationId: string, action?: ConversationAction) => void;
    onListMcpServers: (filter?: Record<string, FilterValue>) => void;
    onMcpServerClick: (id: string, title?: string, options?: Record<string, string>) => void;
    onTabBarAction: (params: TabBarActionParams) => void;
    onGetSerializedChat: (requestId: string, result: GetSerializedChatResult | ErrorResult) => void;
    onPromptInputOptionChange: (params: PromptInputOptionChangeParams) => void;
    onPromptInputButtonClick: (params: ButtonClickParams) => void;
    onStopChatResponse: (tabId: string) => void;
    onButtonClick: (params: ButtonClickParams) => void;
    onOpenSettings: (settingKey: string) => void;
    onAddPinnedContext: (params: PinnedContextParams) => void;
    onRemovePinnedContext: (params: PinnedContextParams) => void;
    onListAvailableModels: (params: ListAvailableModelsParams) => void;
    onOpenFileDialogClick: (params: OpenFileDialogParams) => void;
    onFilesDropped: (params: {
        tabId: string;
        files: FileList;
        insertPosition: number;
    }) => void;
}
