import type { Consumer as MediasoupConsumer, Producer as MediasoupProducer } from 'mediasoup-client/types'

export interface ChadClient {
  socketId: string
  userId: string
  username: string
  displayName: string
  inputMuted?: boolean
  outputMuted?: boolean

  consumers: unknown[]
  producers: unknown[]
  volume: number
  isDominant: boolean
}

export interface AppData {
  socketId?: ChadClient['socketId']
  source?: 'share' | 'mic-video'
}

export interface Consumer {
  id: MediasoupConsumer['id']
  paused: MediasoupConsumer['paused']
  appData: AppData
  raw: MediasoupConsumer
}

export interface Producer {
  id: MediasoupProducer['id']
  paused: MediasoupProducer['paused']
  appData: AppData
  raw: MediasoupProducer
}

export type UpdatedClient = Omit<ChadClient, 'socketId' | 'userId' | 'isMe'>
