<script setup lang="ts">
defineProps<{ showLabels: boolean }>();
const { loggedIn } = useUserSession();
</script>

<template>
  <AuthState>
    <UButton
      :icon="loggedIn ? 'i-lucide-log-out' : 'i-lucide-log-in'"
      color="neutral"
      to="/auth"
      :label="showLabels ? (loggedIn ? 'Déconnexion' : 'Connexion') : undefined"
    />
  </AuthState>
</template>
