<template>
  <div id="app">
    <template v-if="isLoginPage">
      <router-view />
    </template>
    <template v-else>
      <MainLayout />
    </template>
  </div>
</template>

<script>
import { computed } from 'vue';
import { useRoute } from 'vue-router';
import MainLayout from './layouts/MainLayout.vue';

export default {
  name: 'App',
  components: {
    MainLayout
  },
  setup() {
    const route = useRoute();
    const isLoginPage = computed(() => route.path === '/login');

    return {
      isLoginPage
    };
  }
};
</script>

<style>
#app {
  min-height: 100vh;
}
</style>