---
import type { RichText } from '../../../lib/interfaces.ts'

export interface Props {
  richText: RichText
}

const { richText } = Astro.props
---

{
  /* prettier-ignore */
  richText.Href && !richText.Mention ? (
    <a href={richText.Href}><slot /></a>
  ) : (
    <slot />
  )
}

<style>
  a {
    text-decoration: underline;
  }
</style>
