<template>
  <div v-if="isLoginPage" class="login">
    <router-view />
  </div>
  <div v-else class="container">
    <Header />
    <main class="main-wrap">
      <template v-if="!isMainPage">
        <LeftNavBar />
        <div class="content">
          <router-view />
        </div>
      </template>
      <template v-else>
        <router-view />
      </template>
    </main>
  </div>
</template>
<script>
import Header from '../layout/Header.vue';
import Footer from '../layout/Footer.vue';
import LeftNavBar from '../layout/LeftNavBar.vue';

const App = {
  components: { Header, Footer, LeftNavBar },
  computed: {
    isMainPage() {
      return this.$route.path === '/';
    },
    isLoginPage() {
      return this.$route.path === '/login.page';
    },
  },
}

export default App;
</script>
