import { useZocksStore } from '../../app'
import { selectCurrentAudioDeviceId, selectCurrentVideoDeviceId } from './mediaDeviceSlice'

export const useMediaDevice = () => {
  const currentAudioDeviceId = useZocksStore(selectCurrentAudioDeviceId)
  const currentVideoDeviceId = useZocksStore(selectCurrentVideoDeviceId)

  return {
    currentAudioDeviceId,
    currentVideoDeviceId,
  }
}
