import type { Dictionary } from "@/i18n/get-dictionary";

type HeroStatsProps = { stats: Dictionary["home"]["hero"]["stats"]; className?: string };

/** Glass bar with the four headline numbers. Below desktop: centred, wrapping rows 40px apart (2 per row on phones). */
export function HeroStats({ stats, className }: HeroStatsProps) {
  return (
    <div className={className}>
      <dl className="mx-auto grid max-w-[896px] grid-cols-2 gap-4 rounded-2xl border border-white/20 bg-white/10 p-6 backdrop-blur-[10px] max-lg:flex max-lg:flex-wrap max-lg:justify-center max-lg:gap-10 lg:grid-cols-4">
        {stats.map((stat) => (
          <div key={stat.label} className="flex flex-col-reverse items-center gap-1 text-center">
            <dt className="text-xs leading-4 text-soft">{stat.label}</dt>
            <dd className="text-gradient-stat font-heading text-4xl leading-10 font-black" dir="ltr">
              {stat.value}
            </dd>
          </div>
        ))}
      </dl>
    </div>
  );
}
