export type WinnerSector = "health" | "edtech" | "general";

export type WinnerImpactMetric = {
  label: string;
  value: string;
  /** Shown as the large headline metric */
  highlight?: boolean;
};

export type WinnerLinks = {
  website?: string;
  donate?: string;
  view?: string;
};

export type WinnerImpact = {
  summary: string;
  metrics: WinnerImpactMetric[];
  links: WinnerLinks;
};

export type LastYearWinner = {
  id: string;
  name?: string;
  logoSrc?: string;
  initials?: string;
  founderName?: string;
  /** Under public/, e.g. /branding/winners/founders/lifeline-addis-founder.png */
  founderImageSrc?: string;
  sector?: WinnerSector;
  impact?: WinnerImpact;
};

export const lastYearWinnersCopy = {
  eyebrow: "Last year's summit",
  headline: "18+ companies supported",
  hoverHint: "Tap a company to read impact details",
} as const;

const GRV_LOGO = "/branding/logo-icon.png";

const featured: LastYearWinner[] = [
  {
    id: "lifeline-addis",
    name: "Lifeline Addis",
    logoSrc: "/branding/winners/lifeline-addis.png",
    initials: "LA",
    sector: "health",
    founderName: "Founder",
    founderImageSrc: "/branding/winners/founders/lifeline-addis-founder.png",
    impact: {
      summary:
        "GRV mentorship and health-sector intros helped scale community outreach, tele-triage, and clinic partnerships across Addis.",
      metrics: [
        { label: "Patients served", value: "12K+", highlight: true },
        { label: "Telehealth sessions", value: "8.4K" },
        { label: "Health workers trained", value: "45" },
        { label: "Clinic partners", value: "6" },
      ],
      links: {
        website: "https://grvsummit.com/",
        donate: "https://grvsummit.com/",
        view: "https://grvsummit.com/",
      },
    },
  },
  {
    id: "globedock-academy",
    name: "Globedock Academy",
    logoSrc: "/branding/winners/globedock-academy.png",
    initials: "GD",
    sector: "edtech",
    founderName: "Founder",
    founderImageSrc: "/branding/winners/founders/globedock-academy-founder.png",
    impact: {
      summary:
        "Summit showcase and edtech mentors accelerated STEM pathways, instructor certification, and school pilots nationwide.",
      metrics: [
        { label: "Active learners", value: "4.2K", highlight: true },
        { label: "Course completions", value: "11K+" },
        { label: "Certified instructors", value: "14" },
        { label: "School partners", value: "28" },
      ],
      links: {
        website: "https://grvsummit.com/",
        donate: "https://grvsummit.com/",
        view: "https://grvsummit.com/",
      },
    },
  },
  {
    id: "muyalogy",
    name: "Muyalogy",
    logoSrc: "/branding/winners/muyalogy.png",
    initials: "MY",
    sector: "edtech",
    founderName: "Founder",
    founderImageSrc: "/branding/winners/founders/muyalogy-founder.png",
    impact: {
      summary:
        "GRV connected Muyalogy to education partners and investors to grow digital learning access for students and teachers.",
      metrics: [
        { label: "Students reached", value: "3.5K+", highlight: true },
        { label: "Lessons completed", value: "18K+" },
        { label: "Teacher partners", value: "120+" },
        { label: "Learning gain", value: "31%" },
      ],
      links: {
        website: "https://grvsummit.com/",
        donate: "https://grvsummit.com/",
        view: "https://grvsummit.com/",
      },
    },
  },
];

const placeholderCount = 15;
const placeholders: LastYearWinner[] = Array.from({ length: placeholderCount }, (_, i) => ({
  id: `alumni-${i + 1}`,
  logoSrc: GRV_LOGO,
}));

export const lastYearWinners: LastYearWinner[] = [...featured, ...placeholders];

const defaultImpact: WinnerImpact = {
  summary:
    "Part of last year's GRV Summit cohort — gaining visibility, mentorship, and connections across agriculture, health, and education.",
  metrics: [
    { label: "Summit alumni", value: "18+", highlight: true },
    { label: "Mentor hours", value: "200+" },
    { label: "Partner intros", value: "50+" },
    { label: "Sectors", value: "3" },
  ],
  links: {
    view: "/partners",
    donate: "/sponsor",
  },
};

export function getWinnerImpact(company: LastYearWinner): WinnerImpact {
  return company.impact ?? defaultImpact;
}
