import Link from 'next/link';
import React from 'react';

interface AnimatedLinkProps {
  href: string;
  children: React.ReactNode;
  className?: string;
}

const AnimatedLink = ({ href, children, className = '' }: AnimatedLinkProps) => {
  return (
    <Link
      href={href}
      className={`group relative text-white hover:text-white ${className}`}
    >
      {children}
      <span className="absolute bottom-0 left-0 w-full h-0.5 bg-white transform scale-x-0 origin-left transition-transform duration-300 ease-in-out group-hover:scale-x-100"></span>
    </Link>
  );
};

export default AnimatedLink;