import React from "react";
import Icon from "./Icon";
import Link from "next/link";

interface LogoProps {
  label?: string;
  className?: string;
}

function Logo({ label, className }: LogoProps) {
  return (
    <Link
      href={
        label !== undefined
          ? "https://www.youtube.com/channel/UCZzzsJK5koyqUnP4x4oXnqw"
          : "/"
      }
      className={className}
      target={label !== undefined ? "_blank" : ""}
    >
      {/* <Image className="absolute hover:rotate-[360deg] transition duration-1000 ease-in-out" src={logoArrow} alt="Logo"/> */}
      <Icon name="LeafThree24Filled" size="xlarge" />
      {label !== undefined ? (
        <span className="invisible absolute left-[50%] top-[-40px] translate-x-[-50%] p-1 rounded-lg font-bold bg-gray-800 text-fuchsia-400 group-hover:visible">
          {label}
        </span>
      ) : (
        <></>
      )}
    </Link>
  );
}

export default Logo;
