<template>
  <Component :is="layoutComponent">
    <RouterView />
  </Component>

  <ChadDialogContainer />
</template>

<script setup lang="ts">
import ChadDialogContainer from '@shared/components/ui/DialogContainer.vue'
import DefaultLayout from '@shared/layouts/Default.vue'
import { computed } from 'vue'
import { useRoute } from 'vue-router'

const route = useRoute()

const layoutComponent = computed(() => {
  return route.meta.layout ?? DefaultLayout
})
</script>

<style lang="scss">
</style>
