import Link from "next/link";
import styles from "./sectionHeader.module.scss";
import { Icon } from "./Icon";

export const SectionHeader = ({ heading, link, linkText }: { heading: string, link?: string, linkText?: string }) => {
  return (
    <header className={styles.sectionHeader}>
      <h2 className="circlehead">
        <span className="circle"></span>
        <span className="circle"></span>
        <span className="circle"></span>
        {heading}
      </h2>
      {link && linkText &&
        <Link href={link} className={styles.link}>
          <span>{linkText}</span>
          <Icon type="arrowRight" />
        </Link>
      }
    </header>
  );
};
