<script setup>
const props = defineProps({
  to: {
    type: String,
    required: false
  },
  label: {
    type: String,
    required: false
  }
});
</script>

<template>
    <component 
        :is="props.to ? 'router-link' : 'span'" 
        :to="props.to || undefined" 
        :style="props.to ? 'text-decoration: underline;' : ''" 
        :class="props.to ? 'text-primary' : ''">
        <template v-if="props.label">{{ $t(props.label) }}</template>
        <slot v-else />
    </component>
</template>
