<script setup lang="ts">
import Header from '@/components/Header.vue'
import Footer from '@/components/Footer.vue'
import { RouterView } from 'vue-router'
import { useMeta } from 'vue-meta'
import { useI18n } from 'vue-i18n'
import { title } from '@/utils/index'
import authConfig from './composables/auth'
const { authConf } = authConfig()
const { t } = useI18n()

useMeta({
  title: title(t('general.title')),
  og: {
    title: title(t('general.meta.title')),
    description: title(t('general.meta.description'))
  },
  twitter: {
    title: title(t('general.meta.title')),
    description: title(t('general.meta.description'))
  }
})
</script>

<template>
  <metainfo>
    <template v-slot:title="{ content }">{{ content }}</template>
  </metainfo>
  <Header
    :auth-enabled="
      authConf && authConf.auth && authConf.auth.enabled
        ? authConf.auth.enabled
        : true
    "
    :user-profile-url="
      authConf &&
      authConf.auth &&
      authConf.auth.user_profile &&
      authConf.auth.user_profile.url
        ? authConf.auth.user_profile.url
        : ''
    "
  />
  <RouterView />
  <Footer />
</template>
<style scoped></style>
