import React from 'react';

const Credits: React.FC = () => (
  <div className="credits-container">
    <section id="credits" className="credits-section">
      <h1 className="title">Credits</h1>
      <h2 className="subtitle">Icons</h2>
      <p className="paragraph">This project utilizes the following icon resources:</p>
      <CreditLink href="https://fontawesome.com/v4/license/" label="fontawesome" />
      <h2 className="subtitle">Fonts</h2>
      <p className="paragraph">The fonts used in this project are provided by:</p>
      <CreditLink href="https://github.com/itfoundry/Poppins" label="Poppins" />
      <CreditLink href="https://openfontlicense.org" label="Inconsolata, Merriweather, Noto Sans, Noto Serif, Playfair Display, Bangers, Caveat, Frederika the Great, Sofadi One, Zilla Slab Highlight" />
      <CreditLink href="http://www.apache.org/licenses/LICENSE-2.0" label="Roboto, Rock Salt" />
      <CreditLink href="https://ubuntu.com/legal/font-licence" label="Ubuntu" />
    </section>
  </div>
);

const CreditLink = ({ href, label }: { href: string; label: string }) => (
  <a href={href} className="credit-btn" target="_blank" rel="noopener noreferrer">{label}</a>
);

export default Credits;
