import type { RpcMethod } from './types';
export interface PopupConfig {
    popupUrl: string;
    timeout: number;
    appName?: string;
}
export interface PendingRequest<T> {
    resolve: (value: T) => void;
    reject: (error: Error) => void;
    popup: Window | null;
    timeoutId: ReturnType<typeof setTimeout>;
    checkIntervalId: ReturnType<typeof setInterval>;
}
/**
 * Manages popup windows for wallet requests
 */
export declare class PopupManager {
    private config;
    private pendingRequests;
    constructor(config?: Partial<PopupConfig>);
    /**
     * Open a popup window for a wallet request
     */
    openPopup<T>(method: RpcMethod, requestId: string, params?: unknown): Promise<T>;
    /**
     * Resolve a pending request with a result
     */
    resolveRequest(requestId: string, result: unknown): boolean;
    /**
     * Reject a pending request with an error
     */
    rejectRequest(requestId: string, error: Error): boolean;
    /**
     * Check if there's a pending request
     */
    hasPendingRequest(requestId: string): boolean;
    /**
     * Clean up a pending request
     */
    private cleanup;
    /**
     * Clean up all pending requests
     */
    destroy(): void;
}
//# sourceMappingURL=popup.d.ts.map