/* global React, Reveal */

function Wall() {
  const items = [
    { name: "Alan W.",      product: "personal care",     year: "'21", tag: "1:1",    src: "assets/student-alan.jpg",      pos: "50% 40%" },
    { name: "Anastasia M.", product: "health & beauty",   year: "'21", tag: "1:1",    src: "assets/student-anastasia.jpg", pos: "55% 35%" },
    { name: "Benjamin S.",  product: "sports & outdoors", year: "'24", tag: "1:1",    src: "assets/student-benjamin.jpg",  pos: "50% 35%" },
    { name: "John C.",      product: "sports & outdoors", year: "'23", tag: "Cohort", src: "assets/student-john.jpg",      pos: "50% 30%" },
    { name: "Lenka Q.",     product: "home and kitchen",  year: "'21", tag: "Cohort", src: "assets/student-lenka.jpg",     pos: "50% 30%" },
    { name: "Tariq B.",     product: "amazon consulting", year: "'22", tag: "1:1",    src: "assets/student-tariq.jpg",     pos: "50% 30%" },
    { name: "Jessica L.",   product: "pets & baby",       year: "'26", tag: "1:1",    src: "assets/student-jessica.jpg",   pos: "50% 25%" },
    { name: "Nikolina H.",  product: "office & stationary", year: "'26", tag: "Cohort", src: "assets/student-nikolina.jpg",  pos: "50% 35%" },
    { name: "Priscilla Y.", product: "home & kitchen",   year: "'26", tag: "1:1",    src: "assets/student-priscilla.jpg", pos: "50% 25%" },
    { name: "Tim F.",       product: "electronics",       year: "'21", tag: "1:1",    src: "assets/student-tim.jpg",       pos: "40% 40%" },
    { name: "Simon & Kim",  product: "pets & baby",       year: "'26", tag: "Cohort", src: "assets/student-simon-kim.jpg", pos: "55% 35%" },
    { name: "Patricia K.",  product: "home & kitchen",    year: "'21", tag: "1:1",    src: "assets/student-patricia.jpg",  pos: "50% 30%" },
    { name: "Mared J.",     product: "home & kitchen",    year: "'21", tag: "Cohort", src: "assets/student-mared.jpg",     pos: "50% 35%" },
    { name: "Danielle A.",  product: "kitchen & dining",  year: "'21", tag: "1:1",    src: "assets/student-danielle.jpg",  pos: "55% 35%" },
    { name: "Claire Woodrow", product: "home & kitchen",   year: "'25", tag: "1:1",    src: "assets/student-claire.jpg",    pos: "50% 30%" },
  ];

  return (
    <section id="wall" className="section wl">
      <div className="container">
        <Reveal className="wl__head">
          <div>
            <div className="eyebrow">The wall</div>
            <h2 className="display">
              Real people.<br />
              <em>Real products.</em>
            </h2>
          </div>
          <div className="wl__head-right">
            Not testimonials. Not stock photos. Every face below said <em>"I don't know if I can do this"</em> — and then watched their dashboard prove them wrong.
          </div>
        </Reveal>

        <div className="wl__grid">
          {items.map((s, i) => (
            <Reveal key={i} delay={i * 50}>
              <div className="wl__card">
                <div className="wl__photo">
                  <div className="wl__photo-tag">{s.tag}</div>
                  {s.src ? (
                    <img src={s.src} alt={`${s.name} with ${s.product}`} style={{ objectPosition: s.pos || "center" }} />
                  ) : (
                    <div className="wl__photo-placeholder">[ photo · {s.name} with product ]</div>
                  )}
                </div>
                <div>
                  <div className="wl__caption">
                    <span className="wl__name">{s.name}</span>
                    <span className="wl__when">{s.year}</span>
                  </div>
                  <div className="wl__product">{s.product}</div>
                </div>
              </div>
            </Reveal>
          ))}
        </div>

        <Reveal className="wl__footer">
          <div className="wl__count">
            <em>100+</em> more, building right now.
          </div>
          <a className="wl__footer-link" href="https://www.instagram.com/amazonpreneur/" target="_blank" rel="noopener noreferrer">
            See the full wall on Instagram →
          </a>
        </Reveal>
      </div>
    </section>
  );
}

Object.assign(window, { Wall });
