// Icon library — all 1.6 stroke, currentColor
const Icon = ({ name, size = 20, ...rest }) => {
  const s = size;
  const common = { width: s, height: s, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 1.7, strokeLinecap: "round", strokeLinejoin: "round", ...rest };
  switch (name) {
    case "arrow-right":
      return <svg {...common}><path d="M5 12h14M13 5l7 7-7 7"/></svg>;
    case "check":
      return <svg {...common}><path d="M5 12.5l4.5 4.5L19 7"/></svg>;
    case "check-circle":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M8.5 12.5l2.5 2.5L16 9"/></svg>;
    case "sparkle":
      return <svg {...common}><path d="M12 3v4M12 17v4M3 12h4M17 12h4M5.6 5.6l2.8 2.8M15.6 15.6l2.8 2.8M18.4 5.6l-2.8 2.8M8.4 15.6l-2.8 2.8"/></svg>;
    case "ticket":
      return <svg {...common}><path d="M3 8a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v2a2 2 0 0 0 0 4v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2a2 2 0 0 0 0-4z"/><path d="M14 6v12"/></svg>;
    case "calendar":
      return <svg {...common}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></svg>;
    case "users":
      return <svg {...common}><circle cx="9" cy="8" r="3.5"/><path d="M2.5 20a6.5 6.5 0 0 1 13 0"/><circle cx="17" cy="9" r="2.8"/><path d="M22 19a4.5 4.5 0 0 0-7-3.7"/></svg>;
    case "chart":
      return <svg {...common}><path d="M4 19V9M10 19V5M16 19v-7M22 19H2"/></svg>;
    case "shield":
      return <svg {...common}><path d="M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z"/><path d="M9 12l2 2 4-4"/></svg>;
    case "zap":
      return <svg {...common}><path d="M13 2 4 14h7l-1 8 9-12h-7z"/></svg>;
    case "puzzle":
      return <svg {...common}><path d="M14 4h4a2 2 0 0 1 2 2v4h-1a2 2 0 0 0 0 4h1v4a2 2 0 0 1-2 2h-4v-1a2 2 0 0 0-4 0v1H6a2 2 0 0 1-2-2v-4h1a2 2 0 0 0 0-4H4V6a2 2 0 0 1 2-2h4v1a2 2 0 0 0 4 0z"/></svg>;
    case "globe":
      return <svg {...common}><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg>;
    case "credit-card":
      return <svg {...common}><rect x="2.5" y="6" width="19" height="13" rx="2"/><path d="M2.5 11h19M6.5 16h2"/></svg>;
    case "dollar":
      return <svg {...common}><path d="M12 3v18M16 7H9a3 3 0 0 0 0 6h6a3 3 0 0 1 0 6H7"/></svg>;
    case "heart":
      return <svg {...common}><path d="M12 20s-7-4.5-9-9a5 5 0 0 1 9-3 5 5 0 0 1 9 3c-2 4.5-9 9-9 9z"/></svg>;
    case "trophy":
      return <svg {...common}><path d="M7 4h10v4a5 5 0 0 1-10 0z"/><path d="M5 6H3a3 3 0 0 0 4 3M19 6h2a3 3 0 0 1-4 3M9 14h6M10 18h4M12 14v4"/></svg>;
    case "menu":
      return <svg {...common}><path d="M4 7h16M4 12h16M4 17h16"/></svg>;
    case "play":
      return <svg {...common}><path d="M6 4l14 8-14 8z" fill="currentColor"/></svg>;
    case "external":
      return <svg {...common}><path d="M14 4h6v6M20 4l-9 9M19 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2h5"/></svg>;
    case "sponsor":
      return <svg {...common}><path d="M3 7h18l-2 12H5z"/><path d="M8 7V5a4 4 0 0 1 8 0v2"/></svg>;
    case "qr":
      return <svg {...common}><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 14h3v3M21 14v3M14 21h3M17 17h4M21 21v-1"/></svg>;
    case "lock":
      return <svg {...common}><rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>;
    case "rocket":
      return <svg {...common}><path d="M5 19c-1-1-1-3 0-4l2-2 4 4-2 2c-1 1-3 1-4 0z"/><path d="M9 13l2-2 6-6 4 4-6 6-2 2"/><path d="M14 8l2 2"/></svg>;
    case "twitter":
      return <svg viewBox="0 0 24 24" width={s} height={s} fill="currentColor"><path d="M18.244 2H21l-6.52 7.45L22 22h-6.83l-4.78-6.26L4.84 22H2l7-8L2 2h6.84l4.32 5.71L18.244 2zm-1.2 18.16h1.49L7.05 3.74H5.45z"/></svg>;
    case "linkedin":
      return <svg viewBox="0 0 24 24" width={s} height={s} fill="currentColor"><path d="M19 3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2zM8.34 18V10H5.67v8zM7 8.78a1.55 1.55 0 1 0 0-3.1 1.55 1.55 0 0 0 0 3.1zM18.34 18v-4.4c0-2.4-1.28-3.5-3-3.5-1.4 0-2 .77-2.36 1.31V10h-2.66v8h2.66v-4.27c0-1.13.21-2.22 1.61-2.22 1.38 0 1.4 1.28 1.4 2.3V18z"/></svg>;
    default:
      return null;
  }
};

window.Icon = Icon;
