---
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} target={external ? "_blank" : "_self"} {...rest}>
  <slot />
</a>
