---
import config from "../../config.yaml";
const { href, text, icon } = Astro.props;
---

{
  config.socialIcons && (
    <a href={href} target="_blank" rel="noopener noreferrer">
      <i class={`fa-brands fa-${icon ? icon : text.toLowerCase()}`} />
    </a>
  )
}
{
  !config.socialIcons && (
    <a href={href} target="_blank" rel="noopener noreferrer">
      <i class={`fa-brands fa-${icon ? icon : text.toLowerCase()}`} />
    </a>
  )
}
