<script setup lang="ts">
import { useData } from "vitepress";

import TopBar from "./TopBar.vue";
import Home from "./Home.vue";
import NotFound from "./NotFound.vue";

// https://vitepress.dev/reference/runtime-api#usedata
const { frontmatter, page } = useData();
</script>

<template>
  <TopBar />
  <Home v-if="frontmatter.home" />
  <NotFound v-else-if="page.isNotFound" />
  <Content v-else />
</template>
