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

<template>
  <AuthState>
    <UButton
      icon="i-lucide-user"
      color="primary"
      :label="label"
      :to="to"
    />
  </AuthState>
</template>
