<template>
  <transition name="fade-bottom" mode="out-in">
    <LoginPage v-if="getIsLogin" @login-success="autoLoginSuccess" />
  </transition>
</template>
<script lang="ts" setup>
import { computed } from "vue";
import LoginPage from "./LoginPage.vue";
import { useLockStore } from "@/stores/modules/lock";

const lockStore = useLockStore();
const getIsLogin = computed(() => lockStore?.getLockInfo?.isLogin ?? false);

const emit = defineEmits(["loginSuccess"]);
const autoLoginSuccess = () => {
  emit("loginSuccess");
};
</script>
