"use client";

import Link from "next/link";
import { ISidebarLink } from "@/app/features/dashboard/sidebar/SidebarLink.interfaces";
import clsx from "clsx"; // Utility to merge class names
import "./PageLinks.scss";

interface PageLinksProps extends ISidebarLink {
  className?: string;
}

export default function PageLinks({
  title,
  path,
  icon: Icon,
  className,
}: PageLinksProps) {
  return (
    <Link href={path} passHref legacyBehavior>
      <a className={clsx("link-container", className)}>
        {Icon && <Icon />}
        <span className="link-text">{title}</span>
      </a>
    </Link>
  );
}
