/**
 * Game Iframe SDK - Message Handler
 * Xử lý message từ iframe
 */
import { AnswerReportData, FinalResultData } from './types';
import { EventEmitter } from './EventEmitter';
export interface MessageHandlerEvents {
    gameReady: void;
    answerReport: AnswerReportData;
    finalResult: FinalResultData;
    leaderboardRequest: {
        top: number;
    };
    unknownMessage: {
        type: string;
        data: any;
    };
    error: {
        message: string;
        error?: any;
    };
}
export interface MessageHandlerConfig {
    /**
     * Accepted origin (use '*' to accept all - not recommended for production)
     */
    acceptedOrigin: string;
    /**
     * Enable debug logging
     */
    debug?: boolean;
}
/**
 * MessageHandler - Xử lý incoming messages từ iframe
 */
export declare class MessageHandler extends EventEmitter<MessageHandlerEvents> {
    private config;
    private boundHandler;
    private isListening;
    constructor(config: MessageHandlerConfig);
    /**
     * Start listening for messages
     */
    start(): this;
    /**
     * Stop listening for messages
     */
    stop(): this;
    /**
     * Check if handler is listening
     */
    isActive(): boolean;
    /**
     * Handle incoming message
     */
    private handleMessage;
    /**
     * Check if origin is allowed
     */
    private isOriginAllowed;
    /**
     * Debug log
     */
    private log;
    /**
     * Cleanup
     */
    destroy(): void;
}
//# sourceMappingURL=MessageHandler.d.ts.map