<script setup lang="ts">
const { isLoggedIn } = useAuth();
const attrs = computed(() => {
  return isLoggedIn.value
    ? {
        label: "Déconnexion",
        icon: "i-lucide-log-out",
      }
    : {
        label: "Connexion",
        icon: "i-lucide-log-in",
      };
});
</script>

<template>
  <AuthState>
    <UButton to="/connexion" v-bind="attrs" color="neutral" />
  </AuthState>
</template>
