<script setup lang="ts">
const props = defineProps<{ showLabels: boolean }>();
const { isLoggedIn } = useAuth();
const label = computed(() => props.showLabels ? (isLoggedIn.value ? "Espace membre" : "Devenir membre") : undefined);
const to = computed(() => isLoggedIn.value ? "/espace-membre" : "/devenir-membre");
</script>

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