---
import type { HTMLAttributes } from "astro/types";

interface Props extends HTMLAttributes<"a"> {
  href: string;
  external?: boolean;
  class?: string;
}

const { href, external = true, ...rest } = Astro.props;
---

<a
  href={href}
  rel={external ? "noopener nofollow noreferrer" : ""}
  target={external ? "_blank" : "_self"}
  {...rest}
>
  <slot />
</a>
