<script setup lang="ts">
import { RouterView } from 'vue-router'
</script>

<template>
  <Suspense>
    <RouterView />
  </Suspense>
</template>


<!-- <template>
  <component :is="layoutComponent">
    <Suspense>
      <RouterView />
    </Suspense>
  </component>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import { useRoute } from 'vue-router'

import DefaultLayout from '@/layouts/default.vue'
import EmptyLayout from '@/layouts/empty.vue'

const route = useRoute()

const layouts = {
  default: DefaultLayout,
  auth: EmptyLayout
}

console.log(route.fullPath)
console.log(route.name)
console.log(route.matched)

const layoutComponent = computed(() => {
  console.log(route.meta);

  return layouts[route.meta.layout as keyof typeof layouts] || DefaultLayout
})
</script> -->
