// Pummel Tale — Icon library (inline SVGs)
// Stroke-based, fantasy/MMORPG flavor. All accept className.

const Icon = ({ d, size = 22, fill = "none", stroke = "currentColor", strokeWidth = 1.4, children, ...rest }) => (
  <svg viewBox="0 0 24 24" width={size} height={size} fill={fill} stroke={stroke} strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round" {...rest}>
    {d ? <path d={d} /> : children}
  </svg>
);

const Icons = {
  Sword: (p) => <Icon {...p}><path d="M14.5 3 21 3l0 6.5L9.5 21l-3-3L18 6.5z"/><path d="M3.5 13.5 6 11l7 7-2.5 2.5L3.5 21l0-2.5-1.5-1.5z"/><path d="m13 11 3 3"/></Icon>,
  Shield: (p) => <Icon {...p}><path d="M12 3 4 6v6c0 4.5 3.5 8 8 9 4.5-1 8-4.5 8-9V6l-8-3Z"/><path d="M12 8v8M9 12h6"/></Icon>,
  Helm: (p) => <Icon {...p}><path d="M4 12a8 8 0 1 1 16 0v6H4z"/><path d="M4 14h16M9 18v2M15 18v2M12 12v2"/></Icon>,
  Potion: (p) => <Icon {...p}><path d="M9 3h6v3l2 3v9a3 3 0 0 1-3 3h-4a3 3 0 0 1-3-3V9l2-3z"/><path d="M9 12h6"/></Icon>,
  Flame: (p) => <Icon {...p}><path d="M12 3c1 3 4 4 4 8a4 4 0 0 1-8 0c0-2 1-3 2-5 0 2 1 3 2 3 0-2 0-4 0-6z"/></Icon>,
  Crown: (p) => <Icon {...p}><path d="M3 8l3 8h12l3-8-5 3-4-6-4 6z"/><path d="M5 19h14"/></Icon>,
  Bolt: (p) => <Icon {...p}><path d="M13 3 5 14h5l-1 7 8-11h-5z"/></Icon>,
  Skull: (p) => <Icon {...p}><path d="M5 11a7 7 0 1 1 14 0v3l-2 2v3h-3v-2h-4v2H7v-3l-2-2z"/><circle cx="9" cy="11" r="1.2" fill="currentColor"/><circle cx="15" cy="11" r="1.2" fill="currentColor"/></Icon>,
  Banner: (p) => <Icon {...p}><path d="M6 3v18M18 3v18M6 6h12M6 14l6 3 6-3"/></Icon>,
  Globe: (p) => <Icon {...p}><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"/></Icon>,
  Gem: (p) => <Icon {...p}><path d="M6 3h12l3 5-9 13L3 8z"/><path d="M3 8h18M9 3 7 8l5 13M15 3l2 5-5 13"/></Icon>,
  Star: (p) => <Icon {...p}><path d="m12 3 2.8 5.8 6.2.9-4.5 4.4 1.1 6.4L12 17.5 6.4 20.5l1.1-6.4L3 9.7l6.2-.9z"/></Icon>,
  Download: (p) => <Icon {...p}><path d="M12 3v12m0 0 4-4m-4 4-4-4M4 17v4h16v-4"/></Icon>,
  Discord: (p) => <Icon {...p}><path d="M8 9c2-1 6-1 8 0M8 16c2 1 6 1 8 0M5 7c2-2 5-3 7-3s5 1 7 3l1 9-3 2-1-2c-1 1-3 1-4 1s-3 0-4-1l-1 2-3-2z"/><circle cx="9.5" cy="12" r="1" fill="currentColor"/><circle cx="14.5" cy="12" r="1" fill="currentColor"/></Icon>,
  Twitch: (p) => <Icon {...p}><path d="M4 4h16v11l-4 4h-3l-3 3H8v-3H4z"/><path d="M11 8v5M15 8v5"/></Icon>,
  Youtube: (p) => <Icon {...p}><rect x="2" y="6" width="20" height="12" rx="3"/><path d="M10 9.5v5l5-2.5z" fill="currentColor"/></Icon>,
  Twitter: (p) => <Icon {...p}><path d="M3 4h4l4.5 6 5.5-6h4l-8 9 8 11h-4l-5-7-5.5 7H3l7.5-10z"/></Icon>,
  Arrow: (p) => <Icon {...p}><path d="M5 12h14m-4-4 4 4-4 4"/></Icon>,
  Diamond: (p) => <Icon {...p}><path d="M12 3 21 12l-9 9L3 12z"/></Icon>,
  Eye: (p) => <Icon {...p}><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></Icon>,
  Users: (p) => <Icon {...p}><circle cx="9" cy="8" r="4"/><path d="M2 21c0-3.5 3-6 7-6s7 2.5 7 6"/><circle cx="17" cy="6" r="3"/><path d="M22 18c0-2.5-2-4.5-5-4.5"/></Icon>,
  Calendar: (p) => <Icon {...p}><rect x="3" y="5" width="18" height="16" rx="2"/><path d="M3 10h18M8 3v4M16 3v4"/></Icon>,
  User: (p) => <Icon {...p}><circle cx="12" cy="8" r="4"/><path d="M4 21c0-4 4-7 8-7s8 3 8 7"/></Icon>,
  Mail: (p) => <Icon {...p}><rect x="3" y="5" width="18" height="14" rx="1.5"/><path d="m3 7 9 7 9-7"/></Icon>,
  Lock: (p) => <Icon {...p}><rect x="4" y="11" width="16" height="10" rx="1.5"/><path d="M8 11V7a4 4 0 0 1 8 0v4M12 15v2"/></Icon>,
  Check: (p) => <Icon {...p}><path d="m4 12 5 5 11-12"/></Icon>,
  EyeOff: (p) => <Icon {...p}><path d="M3 3l18 18M9.5 5.5A11 11 0 0 1 12 5c6 0 10 7 10 7a18 18 0 0 1-3.2 4M6.6 6.6A18 18 0 0 0 2 12s4 7 10 7c1.6 0 3-.4 4.3-1M10 10a3 3 0 0 0 4 4"/></Icon>,
  Refresh: (p) => <Icon {...p}><path d="M4 12a8 8 0 0 1 13-6l3 3M4 12a8 8 0 0 0 13 6l3-3M17 3v6h-6M7 21v-6h6"/></Icon>,
  X: (p) => <Icon {...p}><path d="M6 6l12 12M18 6l-12 12"/></Icon>,
  Alert: (p) => <Icon {...p}><path d="M12 3 2 21h20L12 3z"/><path d="M12 10v5M12 18v.5"/></Icon>,
  Trophy: (p) => <Icon {...p}><path d="M7 4h10v5a5 5 0 0 1-10 0V4z"/><path d="M5 5H3v3a3 3 0 0 0 4 3M19 5h2v3a3 3 0 0 1-4 3M10 14h4l-1 5h-2z"/><path d="M8 22h8"/></Icon>,
  Heart: (p) => <Icon {...p}><path d="M12 21s-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"/></Icon>,
  Glove: (p) => <Icon {...p}><path d="M8 21V10c0-1 1-2 2-2s2 1 2 2V5a1.5 1.5 0 0 1 3 0v7M15 12V6a1.5 1.5 0 0 1 3 0v9c0 3-2 6-5 6H10c-2 0-4-2-4-4v-5"/></Icon>,
  Boot: (p) => <Icon {...p}><path d="M7 3h5v9l5 3v6H4v-6l3-2z"/><path d="M7 12h5"/></Icon>,
  Ring: (p) => <Icon {...p}><circle cx="12" cy="14" r="6"/><path d="m9 6 3-3 3 3M10.5 8 12 5l1.5 3"/></Icon>,
};

window.Icons = Icons;
