<script setup lang="ts">
defineProps({
  href: {
    type: String,
    default: '',
  },
  blank: {
    type: Boolean,
    default: false,
  },
  /**
   * `true` if `href` points to a static file
   */
  static: {
    type: Boolean,
    default: false,
  },
})
</script>

<template>
  <NuxtLink :to="href" :blank="blank" :static="static">
    <slot />
  </NuxtLink>
</template>

<style lang="ts" scoped>
css({
  ':not(h1, h2, h3, h4) > a': {
    color: 'inherit',
    fontWeight: '{prose.a.font-weight}',
    textDecoration: '{prose.a.text-decoration}',
    '&:hover': {
      textDecoration: '{prose.a.hover.text-decoration}'
    }
  }
})
</style>
