import { useTheme } from 'vuetify'

export default () => {
  const theme = useTheme()

  const isDark = () => theme.global.current.value.dark

  const toggleDark = () => theme.global.name.value = theme.global.current.value.dark
    ? 'light'
    : 'dark'

  return { isDark, toggleDark }
}
