import Heading from "@/app/components/ui/Heading";
import Image, { StaticImageData } from "next/image";

interface MillingCardProps {
  img: StaticImageData;
  title: string;
  description: string;
  translation: string;
}

export function MillingCard({
  img,
  title,
  description,
  translation,
}: MillingCardProps) {
  return (
    <div className="relative w-full group rounded-lg overflow-x-hidden">
      <Image
        src={img}
        alt={title}
        placeholder="blur"
        className="w-full h-auto object-cover"
      />
      <div
        className={`z-10 h-full w-full text-white text-center px-10 rounded-lg absolute top-0 flex flex-col justify-center bg-primary/75 transform duration-1000 ease-in-out ${translation} `}
      >
        <Heading as="h4" variant="card">
          {title}
        </Heading>
        <p>{description}</p>
      </div>
    </div>
  );
}
