/// <reference types="node" />
import { ReactNode } from 'react';
import { EventEmitter } from 'events';
import DyteControlBar from '../lib/DyteControlBar';
import DyteGrid from '../lib/DyteGrid';
import { DyteParticipant, DyteSelfParticipant } from '../lib/DyteParticipant';
import DytePlugin from '../lib/DytePlugin';
import { ChatMessage } from '../types/APITypes';
import { WebsocketMessage } from '../services/MediaRoomSocketService';
import { RoleType, ThemeBodyType } from '../utils/dyte-utils/src';
export interface DyteUIConfig {
    waitingRoom?: {
        element?: ReactNode | string;
        showSelf?: boolean;
    };
    controlBar?: boolean;
    controlBarElements?: {
        plugins?: boolean;
        screenShare?: boolean;
        share?: boolean;
        participants?: boolean;
        chat?: boolean;
        polls?: boolean;
        fullscreen?: boolean;
        layout?: boolean;
    };
    header?: boolean;
    headerElements?: {
        clock?: boolean;
        title?: boolean;
        logo?: boolean;
        participantCount?: boolean;
    };
    aloneHereElement?: boolean;
    logo?: string;
    colors?: {
        primary: string;
        secondary: string;
        textPrimary: string;
        videoBackground: string;
    };
    dimensions?: {
        width: number;
        height: number;
    };
}
export interface DyteConnectionConfig {
    clientId: string;
    roomName: string;
    authToken: string;
    autoTune?: boolean;
    endpoints: any;
    apiBase?: string;
}
export declare type SessionConfig = {
    theme: ThemeBodyType;
    permissions: RoleType;
};
export declare const defaultConfig: SessionConfig;
export declare enum Events {
    participantJoin = "participantJoin",
    participantLeave = "participantLeave",
    disconnect = "disconnect",
    connect = "connect",
    meetingEnded = "meetingEnded",
    roomMessage = "roomMessage",
    chatMessage = "chatMessage",
    message = "message",
    meetingJoined = "meetingJoined",
    activeSpeaker = "activeSpeaker",
    participantUpdate = "participantUpdate"
}
interface ConnectionEvents {
    [Events.participantJoin]: (participant: DyteParticipant | DyteSelfParticipant) => any;
    [Events.participantLeave]: (participant: DyteParticipant | DyteSelfParticipant) => any;
    [Events.participantUpdate]: (participant: DyteParticipant | DyteSelfParticipant) => any;
    [Events.disconnect]: () => any;
    [Events.connect]: () => any;
    [Events.meetingEnded]: ({ kicked: boolean }: {
        kicked: any;
    }) => any;
    [Events.meetingJoined]: () => any;
    [Events.chatMessage]: (message: ChatMessage) => any;
    [Events.message]: (data: any) => any;
    [Events.roomMessage]: (data: any) => any;
    [Events.activeSpeaker]: (participant: DyteParticipant | DyteSelfParticipant) => any;
}
export declare interface Meeting {
    on<U extends keyof ConnectionEvents>(event: U, listener: ConnectionEvents[U]): this;
    emit<U extends keyof ConnectionEvents>(event: U, ...args: Parameters<ConnectionEvents[U]>): boolean;
}
export declare class Meeting extends EventEmitter {
    connectionConfig: DyteConnectionConfig;
    config: SessionConfig;
    controlBar: DyteControlBar;
    grid: DyteGrid;
    participants: Array<DyteSelfParticipant | DyteParticipant>;
    self: DyteSelfParticipant;
    plugins: DytePlugin[];
    Events: typeof Events;
    _setUIConfig: any;
    _onError: any;
    _overlayHook: any;
    _controlsHook: any;
    showSetupScreen: boolean;
    leaveRoom: () => void;
    constructor(connectionConfig: DyteConnectionConfig, uiConfig?: DyteUIConfig);
    updateUIConfig(config: DyteUIConfig): void;
    addParticipantControl(control: any): void;
    sendRoomMessage(message: any): void;
    sendMessage(peerId: string, message: any): void;
    createPopup(element: ReactNode): void;
    closePopup(): void;
    onError(_onError: any): void;
    onSocketMessage(message: WebsocketMessage): void;
    _addUpdateParticipant(peer: any, hook: any): void;
    _removeParticipant(peer: any): void;
}
export {};
