/**
 * SenaGame SDK Loader
 *
 * Ready-to-use interface for game developers.
 * Handles SDK iframe creation, communication, and lifecycle.
 *
 * Usage:
 * ```html
 * <script src="sena-game-sdk.js"></script>
 * <script>
 *   const game = new SenaGameSDK({
 *     iframePath: '/path/to/sdk-iframe/index.html',
 *     mode: 'live',
 *     gameCode: 'G001',
 *     onReady: (sdk) => {
 *       sdk.pushData({ items: [...] });
 *     },
 *     onAnswerResult: (result) => {
 *       console.log('Answer:', result);
 *     }
 *   });
 * </script>
 * ```
 *
 * @version 1.0.0
 */
export interface SenaGameConfig {
    /** Path to SDK iframe HTML file (can be versioned) */
    iframePath: string;
    /** Game mode: 'live' | 'preview' */
    mode: 'live' | 'preview';
    /** Game code for identification */
    gameCode: string;
    /** Enable debug logging */
    debug?: boolean;
    /** Timeout for SDK initialization (ms) */
    timeout?: number;
    /** Custom iframe style */
    iframeStyle?: string;
    onReady?: (sdk: SenaGameSDK) => void;
    onDataReady?: (payload: DataReadyPayload) => void;
    onAnswerResult?: (result: AnswerResultPayload) => void;
    onGameComplete?: (result: GameCompletePayload) => void;
    onSessionStart?: (session: SessionStartPayload) => void;
    onError?: (error: Error) => void;
}
export interface GameItem {
    id: string;
    question: string;
    options?: string[];
    answer?: string | number;
    [key: string]: any;
}
export interface GameData {
    items: GameItem[];
    [key: string]: any;
}
export interface AnswerPayload {
    questionId: string;
    selectedAnswer: string | number | string[];
    timeSpent?: number;
}
export interface DataReadyPayload {
    items: GameItem[];
    totalQuestions: number;
    completedCount: number;
    resumeData?: Array<{
        id: string;
        result: 0 | 1;
    }>;
}
export interface AnswerResultPayload {
    questionId: string;
    isCorrect: boolean;
    correctAnswer: string | number;
    score: number;
    currentScore: number;
    totalAnswered: number;
}
export interface GameCompletePayload {
    success: boolean;
    finalScore: number;
    correctCount: number;
    totalQuestions: number;
    wrongCount: number;
    total: number;
}
export interface SessionStartPayload {
    assignmentId: number;
    userId: string;
    gameId: string;
    startedAt: string;
}
export declare class SenaGameSDK {
    private config;
    private iframe;
    private isReady;
    private isDataReady;
    private pendingMessages;
    private initPromise;
    private initResolver;
    private timeoutId;
    /** SDK version */
    static readonly VERSION = "1.0.0";
    constructor(config: SenaGameConfig);
    /**
     * Push game data to SDK
     */
    pushData(data: any): void;
    /**
     * Submit an answer
     */
    submitAnswer(answer: AnswerPayload): void;
    /**
     * Complete the game
     */
    completeGame(): void;
    /**
     * Get current status
     */
    getStatus(): void;
    /**
     * Wait for SDK to be ready
     */
    ready(): Promise<SenaGameSDK>;
    /**
     * Check if SDK is ready
     */
    get sdkReady(): boolean;
    /**
     * Check if data is ready
     */
    get dataReady(): boolean;
    /**
     * Destroy the SDK instance
     */
    destroy(): void;
    private _init;
    private _createIframe;
    private _send;
    private _handleMessage;
    private _onSDKReady;
    private _onDataReady;
    private _onAnswerResult;
    private _onGameComplete;
    private _onSessionStart;
    private _error;
    private _log;
}
export default SenaGameSDK;
//# sourceMappingURL=SenaGameSDK.d.ts.map