import { EventHandler, InitConfigPayload, RequestConfigResponse, RequestErrorPayload, StartLoadingPayload, ToggleConversationPayload, UploadFilePayload } from './types';
declare class EventEmitter {
    private _name;
    private _listenersByEvent;
    constructor(name: string);
    addListener(event: string, handler: EventHandler, replace?: boolean): void;
    on(event: string, handler: EventHandler, replace?: boolean): void;
    once(event: string, handler: EventHandler): void;
    removeListener(event: string, handler: EventHandler): void;
    off(event: string, handler: EventHandler): void;
    removeAllListener(event: string): void;
    trigger(event: string, ...args: any[]): void;
    emit(event: string, ...args: any[]): void;
}
declare class IframeMessageHandler extends EventEmitter {
    protected _origin: string;
    roleType: number;
    protected DEFAULT_TIMEOUT: number;
    private _targetWindow;
    constructor(name: string, roleType: number, origin?: string, targetWindow?: Window);
    setTargetWindow(target: Window): void;
    destroy(): void;
    handlerSdkPromise(event: MessageEvent): Promise<void>;
    onMessage(event: MessageEvent): void;
    protected sendMessage(key: string, value?: any, promiseId?: number, isReply?: boolean): void;
    protected onPromiseMessage(data: any): Promise<any>;
    protected onNormalMessage(data: any): void;
}
declare class LtPPTIframeSdk extends IframeMessageHandler {
    _promiseId: number;
    private _promiseEvents;
    private _config?;
    constructor(parentOrigin?: string, targetWindow?: Window);
    get nextPromiseId(): number;
    get config(): InitConfigPayload | undefined;
    private _privatePromiseEvents;
    registPromiseEvent(key: string, handler: EventHandler): void;
    unRegistPromiseEvent(key: string): void;
    get promiseEvents(): Record<string, EventHandler>;
    protected onPromiseMessage(data: any): Promise<any>;
    protected onNormalMessage(data: any): void;
    promisePostMessage<T>(key: string, value?: any, options?: {
        timeout?: number;
    }): Promise<T>;
    notifyPagePrepared(): void;
    notifyInitFinish(): void;
    notifyRequestError(data: RequestErrorPayload): void;
    getRequestConfig(params?: Record<string, any>): Promise<RequestConfigResponse>;
    uploadFile(params: UploadFilePayload): Promise<string>;
}
export type { InitConfigPayload, StartLoadingPayload, ToggleConversationPayload };
export declare const iframeSdk: LtPPTIframeSdk;
