<script setup lang="ts">
definePageMeta({ layout: "auth" });

const { isLoggedIn } = useAuth();
const { isRedirecting } = useAuthActions();

useSeoMeta({ title: isLoggedIn.value ? "Déconnexion" : "Connexion" });
</script>

<template>
  <AuthState>
    <AuthRedirecting v-if="isRedirecting" />
    <template v-else>
      <AuthLogoutForm v-if="isLoggedIn" />
      <AuthLoginForm v-else />
    </template>
  </AuthState>
</template>
