<script setup lang="ts">
const props = defineProps<{ showLabels: boolean }>();
const { isLoggedIn } = useAuth();
const label = computed(() => props.showLabels ? (isLoggedIn.value ? "Déconnexion" : "Connexion") : undefined);
</script>

<template>
  <AuthState>
    <UButton
      :icon="isLoggedIn ? 'i-lucide-log-out' : 'i-lucide-log-in'"
      color="neutral"
      to="/connexion"
      :label="label"
    />
  </AuthState>
</template>
