<template>
    <Header v-if="showHeader" />
  <!-- <login/> -->
  <router-view />
</template>

<script lang="ts">
    import { reactive, ref, toRefs, watch } from 'vue';
    import { useRouter } from 'vue-router';
    import Header from './components/Shared/Header.vue';
    import Login from "./components/Login.vue";

    export default {
        name: 'App',
        components: {Login, Header },
        setup() {
            const router = useRouter();
            const showHeader = ref(false);
            watch(() => router.currentRoute.value.path,
                (current, prev) => {
                    showHeader.value = current === "/Login" ? false : true;
                }
            );

            return {showHeader}
        }
    }
</script>
<style>
    @import "element-plus/theme-chalk/index.css";
</style>
