// Site imagery: photorealistic AI-generated images (openai/gpt-image-2) in public/img/ —
// the waving-flag header banner, and one cover photo per competition `icon` key
// (fictional people).

const PHOTO_KEYS = ['adult', 'kid', 'camera', 'candid', 'video', 'star'];

function FlagStripe() {
  return (
    <div className="flagstripe" aria-hidden="true">
      <span style={{ background: '#E0242F' }} /><span style={{ background: '#00843D' }} />
      <span style={{ background: '#FFFFFF' }} /><span style={{ background: '#1A1A1A' }} />
    </div>
  );
}

// Header banner in the spirit of the Eid Al Etihad 55 identity: an original isometric
// illustration (AI-generated, public/img/banner55.jpg, empty centre) with the "55" and
// "عيد الاتحاد" set as live text on top — sharp at any screen size, never stretched.
function Hero55() {
  return (
    <div className="hero55">
      <img className="hero55-bg" src="/img/banner55.jpg?v=1" alt="" fetchpriority="high" />
      <div className="lockup" role="img" aria-label="عيد الاتحاد ٥٥ — ٢ ديسمبر ٢٠٢٦">
        <div className="lockup-inner">
          <div className="num55" aria-hidden="true">55</div>
          <div className="lockup-date" aria-hidden="true">٢ ديسمبر</div>
          <div className="lockup-ar" aria-hidden="true">عيد الاتحاد</div>
          <div className="lockup-year" aria-hidden="true">٢٠٢٦</div>
        </div>
      </div>
    </div>
  );
}

function CatArt({ icon }) {
  const key = PHOTO_KEYS.includes(icon) ? icon : 'star';
  return <img className="cat-art" src={`/img/${key}.jpg?v=1`} alt="" loading="lazy" decoding="async" />;
}

Object.assign(window, { Hero55, CatArt, FlagStripe });
