import { createFileRoute } from "@tanstack/react-router";
import { SiteHeader } from "@/components/SiteHeader";
import { SiteFooter } from "@/components/SiteFooter";
import { PageHero } from "@/components/PageHero";
import heroBg from "@/assets/gallery-launch-3.jpg";
import heartStill from "@/assets/event-heart-screening.jpg.asset.json";
import heartVideo from "@/assets/heart-screening.mp4.asset.json";

export const Route = createFileRoute("/events")({
  head: () => ({
    meta: [
      { title: "Events — DSAG" },
      { name: "description", content: "A timeline of DSAG's events and programmes — from World Down Syndrome Day to hospital programmes, family days and community advocacy." },
      { property: "og:title", content: "DSAG Events" },
    ],
  }),
  component: EventsPage,
});

type TimelineItem = { t: string; date?: string; d: string; video?: string; poster?: string };
const timeline: Array<{ year: string; items: TimelineItem[] }> = [
  {
    year: "2026",
    items: [
      {
        t: "Heart Health Screening Outreach",
        date: "June 6, 2026",
        d: "In partnership with Little Hearts Medical Practice, DSAG hosted a heart health screening for children and young adults with Down syndrome. Families received free cardiac assessments, expert consultations and follow-up referrals — strengthening our commitment to early detection and life-long care.",
        video: heartVideo.url,
        poster: heartStill.url,
      },
      { t: "Hospital Visibility Programme", date: "March 16 – 18, 2026", d: "Three days of hospital visits sharing accurate information on Down syndrome, engaging healthcare professionals, supporting families, promoting early intervention and reducing stigma in healthcare settings." },
      { t: "Buddy Walk for Inclusion", date: "March 21, 2026", d: "A vibrant Buddy Walk for World Down Syndrome Day bringing together families, supporters and community groups, featuring cultural participation symbolising unity and challenging societal perceptions." },
    ],
  },
  {
    year: "2025",
    items: [
      { t: "Hospital Visibility Programme", date: "September 2025", d: "Launch of the Hospital Visibility Programme through visits to selected hospitals — raising awareness, addressing misconceptions and improving early support for children and families." },
      { t: "World Down Syndrome Day School Engagement", date: "March 21, 2025", d: "School engagement at Galaxy International School to educate students on Down syndrome, promote inclusion and encourage acceptance from an early age." },
      { t: "Third Annual Family Day Out & Health Screening", date: "October 2025", d: "Bringing together families, healthcare professionals and stakeholders for engagement, health screening and shared experiences." },
    ],
  },
  {
    year: "2024",
    items: [
      { t: "Media Advocacy & 31 Days of Awareness", date: "October 1 – 31, 2024", d: "Expanded media engagements including a Citi TV appearance. Daily stories of parents and caregivers were shared throughout October to humanise disability narratives and reduce stigma." },
      { t: "Parents' Forum", date: "October 21, 2024", d: "Forum featuring resource persons providing guidance and practical support to caregivers of persons with disabilities." },
      { t: "Formal Launch of DSAG", date: "November 2024", d: "The organisation officially transitioned from Down Syndrome Ghana Foundation to the Down Syndrome Association of Ghana, reflecting a stronger governance direction and national outlook." },
      { t: "BBC Feature", date: "December 2024", d: "DSAG's Project Manager featured on BBC Africa Daily Podcast and Radio, bringing international attention to disability advocacy efforts in Ghana." },
      { t: "2nd Annual Thanksgiving Service", date: "October 2024", d: "Second annual Family Fun Day strengthening community bonds, offering psychosocial support and promoting inclusive participation." },
    ],
  },
  {
    year: "2023",
    items: [
      { t: "First Annual Thanksgiving Service", date: "March 25, 2023", d: "Held at the Legon Interdenominational Church — a moment of reflection, gratitude and solidarity among families and supporters." },
      { t: "Continued Media Advocacy", date: "Throughout 2023", d: "Sustained media advocacy efforts to advance disability inclusion and public education." },
      { t: "Rock Your Socks Campaign", date: "March 2023", d: "Successful social media campaign encouraging supporters to wear mismatched socks as a symbol of awareness and acceptance of Down syndrome." },
      { t: "Community Donations – Akorabo & Suhum", date: "April 2023", d: "Donation drives distributing clothing and wheelchairs to persons with disabilities and underprivileged community members." },
      { t: "2nd Annual Health Screening & Family Day Out", date: "October 2023", d: "Second family day out held at Mmofra Place park." },
    ],
  },
  {
    year: "2022",
    items: [
      { t: "Maiden Family Day Out & Health Screening", date: "October 15, 2022", d: "DSAG's first Family Day Out — bringing together families, professionals and stakeholders to promote awareness, provide health screening and build a strong support network." },
      { t: "School Engagement Programme", date: "October 2022", d: "Educational outreach in selected schools during Down Syndrome Awareness Month, promoting understanding, inclusion and respect for diversity." },
      { t: "World Down Syndrome Day Documentary Launch", date: "March 2022", d: "DSAG's first advocacy documentary under the theme 'Inclusion Means…' — sharing real stories from individuals, families and professionals." },
      { t: "Media & Awareness Campaign", date: "March 2022", d: "Coordinated media campaign across social and traditional platforms to raise awareness, challenge stereotypes and promote acceptance." },
    ],
  },
];

function EventsPage() {
  return (
    <div className="min-h-screen flex flex-col bg-background">
      <SiteHeader />
      <main className="flex-1">
        <PageHero eyebrow="Events" title="Moments that built our movement." subtitle="A timeline of DSAG events, programmes and milestones — from our first family day to our 2026 Buddy Walk." bgImage={heroBg} />
        <section className="max-w-5xl mx-auto px-6 py-20 space-y-16">
          {timeline.map((y) => (
            <div key={y.year}>
              <h2 className="font-display font-extrabold text-4xl md:text-5xl text-primary">{y.year}</h2>
              <div className="mt-6 space-y-4 border-l-2 border-primary/30 pl-6">
                {y.items.map((it) => (
                  <div key={it.t} className="bg-card border border-border rounded-2xl p-6 shadow-soft relative">
                    <div className="absolute -left-[33px] top-7 h-3 w-3 rounded-full bg-accent ring-4 ring-background" />
                    {it.date && <div className="text-xs font-semibold text-primary uppercase tracking-widest">{it.date}</div>}
                    <h3 className="font-display font-bold text-lg mt-1">{it.t}</h3>
                    <p className="text-sm text-muted-foreground mt-2 leading-relaxed">{it.d}</p>
                    {it.video && (
                      <video
                        src={it.video}
                        poster={it.poster}
                        controls
                        playsInline
                        preload="metadata"
                        className="mt-4 w-full rounded-xl bg-black aspect-video object-cover img-enhance"
                      />
                    )}
                  </div>
                ))}
              </div>
            </div>
          ))}
        </section>
      </main>
      <SiteFooter />
    </div>
  );
}
