import { Awareness } from 'y-protocols/awareness';
import type { ConnectionStatus, SimpleSyncProviderOptions, SyncProvider } from '../types';
export declare class SimpleSyncProvider implements SyncProvider {
    private ydoc;
    private room;
    private options;
    private webrtcProvider;
    private websocketProvider;
    private channel;
    private elector;
    private isLeader;
    private isConnected;
    private connectionType;
    private awareness;
    private leaderPeerCounts;
    private containerObservers;
    private observerDebounceTimers;
    private iframeTargets;
    private iframeLoadHandlers;
    private postMessageHandler;
    private isInIframe;
    private parentOrigin;
    private eventHandlers;
    constructor(options: SimpleSyncProviderOptions);
    connect(): Promise<void>;
    private setupLeaderElection;
    private becomeLeader;
    private becomeFollower;
    private setupFollowerSync;
    private detectParentOrigin;
    private detectIframeOrigin;
    private setupPostMessageTransport;
    private sendSyncStep1ToParent;
    private isValidOrigin;
    private handleYjsSyncMessage;
    private broadcastToIframes;
    private sendInitialStateToIframe;
    private autoRegisterIframe;
    private autoUnregisterIframe;
    private setupLeaderSync;
    private connectAsLeader;
    private handleConnection;
    private handleDisconnection;
    private setupAwareness;
    disconnect(): void;
    private disconnectProviders;
    getConnectionStatus(): ConnectionStatus;
    getAwareness(): Awareness | null;
    on(event: string, handler: (...args: unknown[]) => void): void;
    off(event: string, handler: (...args: unknown[]) => void): void;
    private emit;
    watchIframes(container: HTMLElement): () => void;
    unwatchContainer(container: HTMLElement): void;
    unwatchAllIframes(): void;
    destroy(): void;
    log(...args: unknown[]): void;
}
