// Inline SVG icon library — stroke-based, consistent 24px viewBox.
// Style: outlined, 1.6 stroke weight, rounded caps. Like Phosphor/Lucide hybrid.

const IconBase = ({ children, size = 18, stroke = 1.6, style }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none"
       stroke="currentColor" strokeWidth={stroke}
       strokeLinecap="round" strokeLinejoin="round" style={style}>
    {children}
  </svg>
);

const Icon = {
  Home: (p) => <IconBase {...p}><path d="M3 11l9-8 9 8" /><path d="M5 10v10h14V10" /></IconBase>,
  Hubs: (p) => <IconBase {...p}><path d="M12 3l9 4.5-9 4.5L3 7.5 12 3z"/><path d="M3 12l9 4.5L21 12"/><path d="M3 16.5L12 21l9-4.5"/></IconBase>,
  Users: (p) => <IconBase {...p}><circle cx="9" cy="8" r="3.5"/><path d="M2.5 20a6.5 6.5 0 0 1 13 0"/><path d="M16 4a3.5 3.5 0 0 1 0 7"/><path d="M17.5 13a6 6 0 0 1 4 6.5"/></IconBase>,
  Globe: (p) => <IconBase {...p}><circle cx="12" cy="12" r="9"/><path d="M3 12h18"/><path d="M12 3a14 14 0 0 1 0 18 14 14 0 0 1 0-18z"/></IconBase>,
  Trainer: (p) => <IconBase {...p}><path d="M6.5 12a5.5 5.5 0 1 1 11 0"/><circle cx="12" cy="6.5" r="3"/><path d="M4 20l3-3.5"/><path d="M20 20l-3-3.5"/><path d="M8.5 16.5h7"/></IconBase>,
  Search: (p) => <IconBase {...p}><circle cx="11" cy="11" r="7"/><path d="M20 20l-3.5-3.5"/></IconBase>,
  Warn: (p) => <IconBase {...p}><path d="M12 3l10 18H2L12 3z"/><path d="M12 10v5"/><circle cx="12" cy="18" r=".5" fill="currentColor"/></IconBase>,
  Ban: (p) => <IconBase {...p}><circle cx="12" cy="12" r="9"/><path d="M5.5 5.5l13 13"/></IconBase>,
  Discord: (p) => (
    <svg width={p.size || 18} height={p.size || 18} viewBox="0 0 24 24" fill="currentColor">
      <path d="M19.5 5.3c-1.4-.7-2.9-1.1-4.5-1.4-.2.4-.5 1-.6 1.4-1.6-.2-3.3-.2-4.9 0-.2-.4-.4-1-.6-1.4-1.6.3-3.1.7-4.5 1.4C1.5 9.5.7 13.6 1.1 17.7c1.9 1.4 3.8 2.3 5.6 2.8.5-.6.9-1.3 1.2-2-.7-.3-1.4-.6-2-1 .2-.1.4-.2.5-.3 3.9 1.8 8.2 1.8 12.1 0 .2.1.3.2.5.3-.7.4-1.3.7-2 1 .4.7.8 1.4 1.2 2 1.8-.5 3.7-1.4 5.6-2.8.5-4.7-.7-8.8-3.3-12.4zM8.5 15.3c-1.1 0-2-1-2-2.3s.9-2.3 2-2.3 2 1 2 2.3c0 1.3-.9 2.3-2 2.3zm7 0c-1.1 0-2-1-2-2.3s.9-2.3 2-2.3 2 1 2 2.3c0 1.3-.9 2.3-2 2.3z"/>
    </svg>
  ),
  Sun: (p) => <IconBase {...p}><circle cx="12" cy="12" r="4"/><path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/></IconBase>,
  Moon: (p) => <IconBase {...p}><path d="M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5z"/></IconBase>,
  Arrow: (p) => <IconBase {...p}><path d="M5 12h14"/><path d="M13 5l7 7-7 7"/></IconBase>,
  ChevronDown: (p) => <IconBase {...p}><path d="M6 9l6 6 6-6"/></IconBase>,
  Trophy: (p) => <IconBase {...p}><path d="M7 4h10v4a5 5 0 0 1-10 0V4z"/><path d="M5 5H3a3 3 0 0 0 3 3"/><path d="M19 5h2a3 3 0 0 1-3 3"/><path d="M9 13v4M15 13v4M7 20h10"/></IconBase>,
  Bolt: (p) => <IconBase {...p}><path d="M13 3L5 14h6l-1 7 8-11h-6l1-7z"/></IconBase>,
  Play: (p) => <IconBase {...p}><path d="M7 4l13 8-13 8V4z" fill="currentColor"/></IconBase>,
  Shield: (p) => <IconBase {...p}><path d="M12 3l8 3v6c0 5-3.5 8.5-8 9-4.5-.5-8-4-8-9V6l8-3z"/></IconBase>,
  Sparkle: (p) => <IconBase {...p}><path d="M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z"/></IconBase>,
  Check: (p) => <IconBase {...p}><path d="M5 12l5 5L20 7"/></IconBase>,
  ArrowUpRight: (p) => <IconBase {...p}><path d="M7 17L17 7M9 7h8v8"/></IconBase>,
  Hash: (p) => <IconBase {...p}><path d="M5 9h14M5 15h14M10 4l-2 16M16 4l-2 16"/></IconBase>,
  Slash: (p) => <IconBase {...p}><path d="M16 4L8 20"/></IconBase>,
  Send: (p) => <IconBase {...p}><path d="M21 3L3 11l7 3 3 7 8-18z"/><path d="M10 14l4-4"/></IconBase>,
  Pin: (p) => <IconBase {...p}><circle cx="12" cy="10" r="3"/><path d="M12 22s7-6.5 7-12a7 7 0 1 0-14 0c0 5.5 7 12 7 12z"/></IconBase>,
  Calendar: (p) => <IconBase {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 9h18M8 3v4M16 3v4"/></IconBase>,
  Clock: (p) => <IconBase {...p}><circle cx="12" cy="12" r="9"/><path d="M12 7v5l3 2"/></IconBase>,
  Star: (p) => <IconBase {...p}><path d="M12 3l2.7 5.7 6.3.9-4.5 4.4 1.1 6.3L12 17.3l-5.6 3 1.1-6.3L3 9.6l6.3-.9L12 3z"/></IconBase>,
  Menu: (p) => <IconBase {...p}><path d="M4 7h16M4 12h16M4 17h16"/></IconBase>,
  X: (p) => <IconBase {...p}><path d="M5 5l14 14M19 5L5 19"/></IconBase>,
};

window.Icon = Icon;
