import { createGlobalState, useLocalStorage } from '@vueuse/core'

export const usePreferences = createGlobalState(() => {
  const username = useLocalStorage<string>('username', '')

  const audioDevice = shallowRef()
  const videoDevice = shallowRef()

  return {
    username,
    audioDevice,
    videoDevice,
  }
})
