import { LINKS } from "@/shared/variables/links";
import "./NavMenu.scss";
import Link from "next/link";
import { usePathname } from "next/navigation";
import NavAuth from "../NavAuth/NavAuth";

const NavMenu = () => {
  const auth = false;
  const pathname = usePathname();
  return (
    <nav className="nav-menu">
      {LINKS.map((link) => (
        <Link
          className={`nav-menu__link${
            pathname === link.pathname ? "_active" : ""
          }`}
          href={link.pathname}
          key={link.id}
        >
          {link.pagename}
        </Link>
      ))}

      <NavAuth responsible />
    </nav>
  );
};

export default NavMenu;
