import { UserInfo } from "./signaling-connection";
import { SignalData } from "simple-peer";
import { EventEmitter } from "../shared/observable";
import { PeerConnection } from "./peer-connection";
export declare class DataChannelProvider {
    private options;
    private static defaultOptions;
    private Connections;
    constructor(options: RTCConfiguration);
    private factory;
    withOffer(user: UserInfo, signal: SignalData, onPeerConnection: (c: PeerConnection, room: string) => void): Promise<RTCPeerConnection>;
    initiate(user: UserInfo, room: string, currentUser: any): Promise<RTCDataChannel>;
    private listenIce;
    getConnection(user: UserInfo, room: string, currentUser: string): Promise<PeerConnection>;
    dispose(): void;
}
export declare function fromFirstEvent(target: EventTarget, eventName: string, options?: EventListenerOptions): Promise<Event>;
export declare function fromFirstEvent<TEvent extends keyof TEvents, TEvents>(target: EventEmitter<TEvents>, eventName: TEvent): Promise<TEvents[TEvent]>;
