/**
 * WebRTC2 Client Types
 */

export interface WebRTCConfig {
    iceServers: RTCIceServer[];
    signaling: {
        url: string;
        options?: any;
    };
}

export type ConnectionState =
    | 'disconnected'
    | 'connecting'
    | 'connected'
    | 'failed'
    | 'closed';

export interface MediaStreamOptions {
    video?: boolean | MediaTrackConstraints;
    audio?: boolean | MediaTrackConstraints;
    screen?: boolean;
}

export interface PeerConnection {
    id: string;
    connection: RTCPeerConnection;
    stream?: MediaStream;
}

export type CallState =
    | 'idle'
    | 'calling'
    | 'ringing'
    | 'connected'
    | 'ended';

export interface WebRTCHookReturn {
    connect: (roomId: string) => Promise<void>;
    disconnect: () => void;
    localStream: MediaStream | null;
    remoteStream: MediaStream | null;
    connectionState: ConnectionState;
    callState: CallState;
} 