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

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