import styles from '/styles/Home.module.css'
import Link from 'next/link'
import { usePathname } from 'next/navigation'

const navLinks = [
  { name: "Home", href: "/" },
  { name: "About", href: "/about" },
  { name: "Games", href: "/games" },
  { name: "Services", href: "/services" }
]

const Navbar = () => {
  const path = usePathname();

  return (
    <nav className={styles.navbar}>
      {navLinks.map((item, index) => (
        <Link className={path == item.href ? styles.navelem_active : styles.navelem} key={item.name} href={item.href}>
          {item.name}
        </Link>
      ))}
      <Link className={styles.navelem} key="Mastodon_Verify" rel="me" href="https://mastodon.neshweb.net/@neshura">Mastodon</Link>
    </nav>
  );
}

export default Navbar;