import type { PartnerSection } from "@/content/partners";
import { PartnerCard } from "@/components/partners/PartnerCard";
import { Separator } from "@/components/ui/separator";

type Props = {
  section: PartnerSection;
  showTitle?: boolean;
};

export function PartnerSectionBlock({ section, showTitle = true }: Props) {
  return (
    <div className="space-y-8">
      {showTitle && (
        <>
          <h2 className="text-3xl font-bold tracking-tight text-[#30614c]">
            {section.title}
          </h2>
          <Separator />
        </>
      )}
      {section.tierLabel && (
        <p className="text-xs font-semibold uppercase tracking-widest text-[#37a47a]">
          {section.tierLabel}
        </p>
      )}
      <div className="grid gap-6 md:grid-cols-2">
        {section.partners.map((partner) => (
          <PartnerCard key={partner.name} partner={partner} />
        ))}
      </div>
    </div>
  );
}
