<script setup lang="ts">
import { ref } from 'vue';
import Layout from './components/Layout.vue';
import Dashboard from './pages/Dashboard.vue';
import Articles from './pages/Articles.vue';
import FormSubmission from './pages/FormSubmission.vue';

const currentPage = ref('dashboard');
</script>

<template>
  <Layout :currentPage="currentPage" @navigate="(page) => (currentPage = page)">
    <Dashboard v-if="currentPage === 'dashboard'" />
    <Articles v-if="currentPage === 'articles'" />
    <FormSubmission v-if="currentPage === 'form'" />
  </Layout>
</template>
