import { Request } from '../../utils/request'

export const GetRoomUser = (roomNum: string) => Request({
  url: `/room/user?roomNum=${roomNum}`,
  method: 'get'
})

export const GetShowUser = (roomNum: string) => Request({
  url: `/room/show-user?roomNum=${roomNum}`,
  method: 'get'
})

export const GetApplySpeak = (roomNum: string) => Request({
  url: `/room/apply-speak?roomNum=${roomNum}`,
  method: 'get'
})

export const PostMuteAll = (data: any) => {
  return Request({
    url: `/room/mute-all?roomNum=${data.roomNum}&enableMicr=${data.enableMicr}`,
    method: 'get',
  })
}

export const PostOpenMicr = (data: any) => {
  return Request({
    url: `/room/oper-micr?roomNum=${data.roomNum}&enableMicr=${data.enableMicr}&uid=${data.uid}`,
    method: 'get',
  })
}

export const PostOpenCamera = (data: any) =>
  Request({
    url: `/room/oper-camera`,
    method: 'get',
    data
  })

export const DeleteRoomManager = (data: any) =>
  Request({
    url: `/room/manager`,
    method: 'delete',
    data
  })

export const GetRoomInfo = (roomNum: string) =>
  Request({
    url: `/room/${roomNum}`,
    method: 'get',
  })
