<script setup lang="ts">
const props = defineProps<{
  type: string
}>()

const { l, p } = useContentInjected()
const details = computed(() => l.value[props.type])
</script>

<template>
  <UButton
    :to="details.external ? details.link : p(details.link)"
    :target="details.external ? '_blank' : undefined"
    variant="solid"
    :trailing-icon="details.icon"
    :external="details.external"
  >
    {{ details.label }}
  </UButton>
</template>
