"use client";

import Image from "next/image";
import CountUp from "@/components/ui/CountUp";

/** One achievement tile: an icon, a count and its label. */
export default function AchievementCard({
  icon,
  value,
  label,
  colorClass,
}: {
  icon: string;
  value: string | number;
  label: string;
  colorClass: string;
}) {
  return (
    <div
      className={`flex min-h-[195px] flex-col items-center rounded-bl-[40px] rounded-br-[40px] rounded-tr-[40px] border-[3px] p-4 text-center shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25)] ${colorClass}`}
    >
      <Image src={icon} alt="" width={60} height={60} className="mb-2 h-[48px] w-auto" />
      <strong className="text-[30px]">
        <CountUp value={value} />
      </strong>
      <span className="pt-2 font-semibold">{label}</span>
    </div>
  );
}
