/// <reference types="node" />
import OT, { Connection } from '@opentok/client';
import { EventEmitter } from 'events';
import { LayoutOptions } from '../mp/layout-manager';
import CameraPublisher from '../mp/camera-publisher';
import CameraSubscriber from '../mp/camera-subscriber';
import ScreenPublisher from '../mp/screen-publisher';
import ScreenSubscriber from '../mp/screen-subscriber';
import { ActiveSpeakerInfo } from '../mp/active-speaker-tracker';
import Participant from './participant';
import ParticipantWrapper from '../mp/participant';
import { RoomProperties, LayoutMode, IceConfig } from '../utils/types';
import { SignalOptions, SignalEvent } from '../types/signaling';
import LocalParticipant from './local-participant';
import LocalParticipantWrapper from '../mp/local-participant';
declare interface Room {
    on(event: 'connected', listener: () => void): this;
    on(event: 'disconnected', listener: (reason: string) => void): this;
    on(event: 'reconnecting', listener: () => void): this;
    on(event: 'reconnected', listener: () => void): this;
    on(event: 'cameraPublisherMediaDisabled', listener: () => void): this;
    on(event: 'cameraSubscriberVideoDisabled', listener: (id: string) => void): this;
    on(event: 'participantJoined', listener: (participant: ParticipantWrapper) => void): this;
    on(event: 'participantLeft', listener: (participant: ParticipantWrapper, reason: string) => void): this;
    on(event: 'activeSpeakerChanged', listener: (participant: ParticipantWrapper) => void): this;
    on(event: 'signal', listener: (event: SignalEvent) => void): this;
}
declare class Room extends EventEmitter {
    apiKey: string;
    roomId: string;
    token: string;
    iceConfig?: IceConfig;
    encryptionEnabled?: boolean;
    roomContainer: HTMLElement | string;
    managedLayoutOptions?: LayoutOptions;
    mediaShutoffThreshold?: number;
    maxVideoParticipantsOnScreen?: number;
    useMobileLayout: boolean;
    participants: Record<string, Participant | LocalParticipant>;
    participantWrappers: Record<string, ParticipantWrapper | LocalParticipantWrapper>;
    camera: CameraPublisher;
    screen: ScreenPublisher;
    participantName: string;
    participantInitials: string;
    private _waitUntilJoined;
    private _analytics;
    private _session;
    private _layoutManager;
    private _activeSpeakerTracker;
    private _cameraSubscribers;
    private _screenSubscribers;
    private _visibleParticipantsCount;
    constructor(roomProperties: RoomProperties);
    _attachOTSessionEventListeners: () => void;
    _createParticipant: (connection: Connection) => {
        participant: Participant | LocalParticipant;
        participantWrapper: ParticipantWrapper | LocalParticipantWrapper;
    };
    _createLocalParticipant: (connection: Connection, name?: string) => {
        participant: LocalParticipant;
        participantWrapper: LocalParticipantWrapper;
    };
    _createRemoteParticipant: (connection: Connection) => {
        participant: Participant;
        participantWrapper: ParticipantWrapper;
    };
    _removeOTSessionEventListeners: () => void;
    _createDefaultRoomContainer: () => HTMLElement;
    _getDefaultPublisherElement: (type?: 'camera' | 'screen') => HTMLElement;
    _connect: () => Promise<void>;
    _isMe: (connection: OT.Connection | null) => boolean;
    get participantId(): string;
    get participantConnectionData(): string;
    _setOptimalSubscriberResolutions: () => void;
    _getCameraSubscriberElement: (subscriberId?: string) => HTMLElement | undefined;
    _onParticipantNameReceived: (participantWrapper: ParticipantWrapper | LocalParticipantWrapper, name: string) => void;
    _onSignalReceived: (event: {
        type?: string;
        data?: string;
        from: OT.Connection | null;
    }) => void;
    _onCameraSubscriberCreated: (stream: OT.Stream, cameraSubscriber: CameraSubscriber) => void;
    _onScreenSubscriberCreated: (stream: OT.Stream, screenSubscriber: ScreenSubscriber) => void;
    _onActiveSpeakerStatusChanged: (payload: {
        isSpeaking: boolean;
    }) => void;
    _onActiveSpeakerChanged: ({ newActiveSpeaker, previousActiveSpeaker, }: {
        newActiveSpeaker: ActiveSpeakerInfo;
        previousActiveSpeaker: ActiveSpeakerInfo;
    }) => void;
    _sendParticipantName: (to?: OT.Connection) => Promise<void>;
    _shouldEnableParticipantVideo: () => boolean;
    _shouldDisablePublisherMedia: () => boolean;
    _onParticipantStreamDestroyed: () => Promise<void>;
    _onParticipantStreamCreated: (session: OT.Session, stream: OT.Stream, participant: Participant, shouldEnableVideo: boolean) => Promise<void>;
    _onCameraSubscriberHiddenByLayoutManager: (subscriberId: string) => void;
    _onCameraSubscriberDisplayedByLayoutManager: (subscriberId: string) => void;
    join: (publisherOptions?: {
        targetElement?: HTMLElement | string;
        publisherProperties?: OT.PublisherProperties;
    }) => Promise<void>;
    _cleanupOnDisconnect: () => void;
    leave: () => Promise<void>;
    _onCameraPublisherDestroyed: () => void;
    setLayoutMode: (mode: LayoutMode) => void;
    setEncryptionSecret: (encryptionSecret: string) => Promise<void>;
    startScreensharing: (targetElement?: HTMLElement | string) => Promise<void>;
    stopScreensharing: () => void;
    signal({ to, data, type, retryAfterReconnect, }: SignalOptions): Promise<void>;
}
export default Room;
