/**
 * 统一事件类型系统
 *
 * 本文件定义了 AIBlueking V2 组件的完整事件类型系统，包括：
 * 1. UI 事件 - 面板、Nimbus、拖拽等 UI 交互事件
 * 2. 业务事件 - 消息、会话等业务操作事件
 * 3. 子组件事件 - ChatBot、AIHeader 等子组件发射的事件
 *
 * 事件桥接映射：
 * - 内部事件通过 useEventBridge 自动桥接到 Vue emit
 * - 某些内部事件不对外暴露（映射为 null）
 */
import type { ISession } from '@blueking/chat-helper';
import type { PositionAndSize, IShortcut } from './types';
import type { IChatHelper } from '../types';
/**
 * UI 事件名称
 */
export type UIEvent = 'panel-show' | 'panel-hide' | 'panel-toggle' | 'nimbus-click' | 'nimbus-minimize' | 'nimbus-restore' | 'popup-click' | 'popup-shortcut-click' | 'dragging' | 'resizing' | 'drag-stop' | 'resize-stop' | 'compression-toggle' | 'side-panel-expand' | 'side-panel-collapse';
/**
 * UI 事件数据映射
 */
export interface UIEventData {
    'panel-show': {
        sessionCode?: string;
    };
    'panel-hide': Record<string, never>;
    'panel-toggle': {
        visible: boolean;
    };
    'nimbus-click': Record<string, never>;
    'nimbus-minimize': Record<string, never>;
    'nimbus-restore': Record<string, never>;
    'popup-click': Record<string, never>;
    'popup-shortcut-click': {
        shortcut: IShortcut;
    };
    dragging: PositionAndSize;
    resizing: PositionAndSize;
    'drag-stop': PositionAndSize;
    'resize-stop': PositionAndSize;
    'compression-toggle': {
        compressed: boolean;
    };
    'side-panel-expand': {
        extraWidth: number;
    };
    'side-panel-collapse': Record<string, never>;
}
/**
 * 业务事件名称
 */
export type BusinessEvent = 'send-message' | 'receive-start' | 'receive-text' | 'receive-end' | 'receive-error' | 'stop' | 'chat-regenerate' | 'chat-retry' | 'message-deleted' | 'messages-batch-deleted' | 'session-created' | 'session-switched' | 'session-deleted' | 'session-updated' | 'sessions-loaded' | 'session-initialized' | 'session-error' | 'shortcut-click' | 'chat-error' | 'sdk-error';
/**
 * 业务事件数据映射
 */
export interface BusinessEventData {
    'send-message': {
        content: string;
    };
    'receive-start': Record<string, never>;
    'receive-text': Record<string, never>;
    'receive-end': Record<string, never>;
    'receive-error': {
        error: Error;
    };
    stop: Record<string, never>;
    'chat-regenerate': {
        messageId: string;
    };
    'chat-retry': {
        messageId: string;
    };
    'message-deleted': {
        messageId: number;
    };
    'messages-batch-deleted': {
        messageIds: number[];
    };
    'session-created': {
        session: ISession;
    };
    'session-switched': {
        session: ISession | null;
    };
    'session-deleted': {
        sessionCode: string;
    };
    'session-updated': {
        session: ISession;
    };
    'sessions-loaded': {
        sessions: ISession[];
    };
    'session-initialized': {
        openingRemark: string;
        predefinedQuestions: string[];
    };
    'session-error': {
        action: string;
        error: unknown;
    };
    'shortcut-click': {
        shortcut: IShortcut;
        source: 'popup' | 'main';
    };
    'chat-error': {
        action: string;
        error: unknown;
    };
    'sdk-error': {
        apiName: string;
        code: number;
        message: string;
        data: unknown;
    };
}
/**
 * Header 事件名称
 */
export type HeaderEvent = 'new-chat' | 'new-chat-created' | 'history-click' | 'auto-generate-name' | 'help-click' | 'rename' | 'share' | 'close' | 'toggle-compression';
/**
 * Header 事件数据映射
 */
export interface HeaderEventData {
    'new-chat': Record<string, never>;
    'new-chat-created': {
        session: {
            sessionCode: string;
            sessionName?: string;
            createdAt?: string;
        };
    };
    'history-click': {
        event: Event;
    };
    'auto-generate-name': Record<string, never>;
    'help-click': Record<string, never>;
    rename: {
        newName: string;
    };
    share: Record<string, never>;
    close: Record<string, never>;
    'toggle-compression': Record<string, never>;
}
/**
 * 消息选择事件名称
 */
export type MessageSelectionEvent = 'transfer-messages' | 'share-messages';
/**
 * 消息选择事件数据映射
 */
export interface MessageSelectionEventData {
    'transfer-messages': {
        messageIds: string[];
    };
    'share-messages': {
        messageIds: string[];
    };
}
/**
 * ChatBot 内部事件名称
 */
export type ChatBotInternalEvent = 'agent-info-loaded' | 'error';
/**
 * ChatBot 内部事件数据映射
 */
export interface ChatBotInternalEventData {
    'agent-info-loaded': {
        chatHelper: IChatHelper;
    };
    error: {
        error: Error;
    };
}
/**
 * ComponentManager 事件（UI + 业务事件的子集）
 * 这些事件由 ComponentManager 内部管理和发射
 */
export type ComponentEvent = UIEvent | Extract<BusinessEvent, 'shortcut-click'>;
/**
 * ComponentManager 事件数据
 */
export type ComponentEventData = UIEventData & Pick<BusinessEventData, 'shortcut-click'>;
/**
 * 所有内部事件类型
 * 用于 ComponentManager 和业务管理器
 */
export type InternalEvent = UIEvent | BusinessEvent | HeaderEvent | MessageSelectionEvent | ChatBotInternalEvent;
/**
 * 所有内部事件数据
 */
export type InternalEventData = UIEventData & BusinessEventData & HeaderEventData & MessageSelectionEventData & ChatBotInternalEventData;
/**
 * 事件桥接映射配置
 * key: 内部事件名
 * value: Vue emit 事件名（null 表示不对外暴露）
 */
export declare const EVENT_BRIDGE_MAP: Record<InternalEvent, string | null>;
/**
 * 获取对外暴露的事件列表
 */
export declare function getExternalEvents(): string[];
/**
 * 获取内部事件对应的外部事件名
 */
export declare function getExternalEventName(internalEvent: InternalEvent): string | null;
/**
 * 事件回调类型（泛型）
 */
export type EventCallback<T extends InternalEvent> = (data: InternalEventData[T]) => void;
/**
 * ComponentManager 事件回调类型
 */
export type ComponentEventCallback<T extends ComponentEvent> = (data: ComponentEventData[T]) => void;
/**
 * 将内部事件数据转换为 Vue emit 参数
 * 某些事件需要特殊处理（如解构对象为多个参数）
 */
export declare function transformEventDataToEmitArgs(event: InternalEvent, data: InternalEventData[InternalEvent]): unknown[];
//# sourceMappingURL=event-types.d.ts.map