import { listNav } from "@/constans";
import { isActiveURL } from "@/helper";
import Link from "next/link";

function Row({ name }) {
    return (
        <ul className="hidden lg:flex items-center justify-center gap-[40px]">
            {listNav.map(nav => (
                <li
                    key={nav.id}
                >
                    <Link
                        href={nav.link}
                        className={`
                                ${isActiveURL(nav.link.replace('/', ''), name) ? '!text-[#526CAC]' : 'text-[#525252]'}
                                    text-[16px] font-medium
                                `}
                    >
                        {nav.name}
                    </Link>
                </li>
            ))}
        </ul>
    )
}

export default Row