---
import type { LinkProps } from "@/types/props"
import type { PajamasIcon } from "@/types/icons"
import ExternalLinkTextOnly from "./ExternalLinkTextOnly.astro"
import ExternalLinkIconLeft from "./ExternalLinkIconLeft.astro"
interface Props extends LinkProps {
iconLeft?: PajamasIcon
iconLeftAriaLabel?: string
}
const { iconLeft, iconLeftAriaLabel, ...props } = Astro.props
if (iconLeft && !iconLeftAriaLabel) {
throw new Error("ExternalLink: iconLeftAriaLabel is required when iconLeft is provided")
}
---
{ iconLeft && iconLeftAriaLabel
?
:
}