<template>
  <div>
    <slot />
  </div>
</template>

<script>
import { getCurrentInstance } from 'vue'
import { useState } from '~/store'

export default {
  name: 'ThemedLayout',
  setup() {
    const instance = getCurrentInstance()
    const state = useState()
    if (instance) {
      instance.proxy.$vuetify.theme.dark = state.darkMode
    }
  }
}
</script>
