<template>
  <component :is="Layout">
    <router-view />
  </component>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import layout1 from './Layouts/MainPage/index.vue';
import layout2 from './Layouts/HelpCenter/index.vue'
import layout3 from './Layouts/Solutions/index.vue'
import layout4 from './Layouts/Others/index.vue'
import { useRoute } from 'vue-router';

const route = useRoute()
const Layout = computed(() => {
  const meta = route.meta.layout
  let currentLayout
  switch (meta) {
    case 2:
      currentLayout = layout2
      break
    case 3:
      currentLayout = layout3
      break
    case 4:
      currentLayout = layout4
      break
    default:
      currentLayout = layout1
      break
  }
  return currentLayout
})
</script>

