/* Lucide-style icons as inline SVGs.
   Pass size + className. Stroke="currentColor" so they inherit. */

const Svg = ({ size = 16, children, className = "icon", style }) => (
  <svg
    xmlns="http://www.w3.org/2000/svg"
    width={size}
    height={size}
    viewBox="0 0 24 24"
    fill="none"
    stroke="currentColor"
    strokeWidth="1.75"
    strokeLinecap="round"
    strokeLinejoin="round"
    className={className}
    style={style}
    aria-hidden="true"
  >
    {children}
  </svg>
);

const Icon = {
  Home:    (p) => <Svg {...p}><path d="M3 10.5 12 3l9 7.5" /><path d="M5 9.5V20h14V9.5" /></Svg>,
  Activity:(p) => <Svg {...p}><path d="M3 12h4l3-8 4 16 3-8h4" /></Svg>,
  Zap:     (p) => <Svg {...p}><path d="M13 3 4 14h7l-1 7 9-11h-7l1-7z" /></Svg>,
  Flame:   (p) => <Svg {...p}><path d="M12 3c2 3 5 5 5 9a5 5 0 0 1-10 0c0-2 1-3 2-4 0 2 1 3 2 3 0-3 1-5 1-8z" /></Svg>,
  Chart:   (p) => <Svg {...p}><path d="M3 3v18h18" /><path d="M7 14l4-4 3 3 5-6" /></Svg>,
  Book:    (p) => <Svg {...p}><path d="M4 5a2 2 0 0 1 2-2h13v18H6a2 2 0 0 1-2-2z" /><path d="M4 17.5A2 2 0 0 1 6 16h13" /></Svg>,
  Stats:   (p) => <Svg {...p}><rect x="3" y="13" width="4" height="8" rx="1" /><rect x="10" y="8" width="4" height="13" rx="1" /><rect x="17" y="3" width="4" height="18" rx="1" /></Svg>,
  Settings:(p) => <Svg {...p}><circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1A1.7 1.7 0 0 0 9 19.4a1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1A1.7 1.7 0 0 0 4.6 9a1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z" /></Svg>,
  Search:  (p) => <Svg {...p}><circle cx="11" cy="11" r="7" /><path d="m20 20-3.5-3.5" /></Svg>,
  Bell:    (p) => <Svg {...p}><path d="M6 8a6 6 0 1 1 12 0c0 7 3 8 3 9H3c0-1 3-2 3-9z" /><path d="M10 21a2 2 0 0 0 4 0" /></Svg>,
  User:    (p) => <Svg {...p}><circle cx="12" cy="8" r="4" /><path d="M4 21c1.5-4 5-6 8-6s6.5 2 8 6" /></Svg>,
  ChevronRight:(p) => <Svg {...p}><path d="m9 6 6 6-6 6" /></Svg>,
  ChevronDown:(p) => <Svg {...p}><path d="m6 9 6 6 6-6" /></Svg>,
  ArrowUp:   (p) => <Svg {...p}><path d="M12 19V5" /><path d="m5 12 7-7 7 7" /></Svg>,
  ArrowDown: (p) => <Svg {...p}><path d="M12 5v14" /><path d="m5 12 7 7 7-7" /></Svg>,
  TrendUp:   (p) => <Svg {...p}><path d="m22 7-8.5 8.5-5-5L2 17" /><path d="M16 7h6v6" /></Svg>,
  TrendDown: (p) => <Svg {...p}><path d="m22 17-8.5-8.5-5 5L2 7" /><path d="M16 17h6v-6" /></Svg>,
  Shield:    (p) => <Svg {...p}><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" /></Svg>,
  Target:    (p) => <Svg {...p}><circle cx="12" cy="12" r="9" /><circle cx="12" cy="12" r="5" /><circle cx="12" cy="12" r="1.5" fill="currentColor"/></Svg>,
  X:         (p) => <Svg {...p}><path d="M18 6 6 18M6 6l12 12" /></Svg>,
  Check:     (p) => <Svg {...p}><path d="M5 12.5 10 17.5 19 7.5" /></Svg>,
  Clock:     (p) => <Svg {...p}><circle cx="12" cy="12" r="9" /><path d="M12 7v5l3 2" /></Svg>,
  Plus:      (p) => <Svg {...p}><path d="M12 5v14M5 12h14" /></Svg>,
  Filter:    (p) => <Svg {...p}><path d="M3 5h18l-7 9v6l-4-2v-4z" /></Svg>,
  Refresh:   (p) => <Svg {...p}><path d="M3 12a9 9 0 0 1 15-6.7L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 0 1-15 6.7L3 16" /><path d="M3 21v-5h5" /></Svg>,
  Play:      (p) => <Svg {...p}><path d="M6 4 20 12 6 20z" fill="currentColor"/></Svg>,
  Pause:     (p) => <Svg {...p}><rect x="6" y="4" width="4" height="16" rx="1" /><rect x="14" y="4" width="4" height="16" rx="1" /></Svg>,
  Dot:       (p) => <Svg {...p}><circle cx="12" cy="12" r="4" fill="currentColor"/></Svg>,
  Lightning: (p) => <Svg {...p}><path d="M13 3 4 14h7l-1 7 9-11h-7l1-7z" fill="currentColor" fillOpacity="0.15"/></Svg>,
  Coin:      (p) => <Svg {...p}><circle cx="12" cy="12" r="9" /><path d="M9 9h4a2 2 0 0 1 0 4H9z" /><path d="M9 13h5a2 2 0 0 1 0 4H9z" /></Svg>,
  Calendar:  (p) => <Svg {...p}><rect x="3" y="5" width="18" height="16" rx="2" /><path d="M3 9h18M8 3v4M16 3v4" /></Svg>,
  ExternalLink:(p)=> <Svg {...p}><path d="M14 4h6v6" /><path d="M20 4 11 13" /><path d="M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5" /></Svg>,
  Sparkles:  (p) => <Svg {...p}><path d="M12 3v3M12 18v3M3 12h3M18 12h3" /><path d="m5 5 2 2M17 17l2 2M5 19l2-2M17 7l2-2" /></Svg>,
  Brain:     (p) => <Svg {...p}><path d="M12 5a3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0-2 5 3 3 0 0 0 2 5 3 3 0 0 0 3 3 3 3 0 0 0 3-3z" /><path d="M12 5a3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1 2 5 3 3 0 0 1-2 5 3 3 0 0 1-3 3 3 3 0 0 1-3-3z" /></Svg>,
  AlertTriangle:(p) => <Svg {...p}><path d="M10.3 3.7 2.1 18a2 2 0 0 0 1.7 3h16.4a2 2 0 0 0 1.7-3L13.7 3.7a2 2 0 0 0-3.4 0z" /><path d="M12 9v4M12 17h.01" /></Svg>,
  Edit:      (p) => <Svg {...p}><path d="M17 3.5 20.5 7 7 20.5H3.5V17z" /></Svg>,
  Trash:     (p) => <Svg {...p}><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2M5 6l1 14a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-14" /></Svg>,
  Lock:      (p) => <Svg {...p}><rect x="4" y="11" width="16" height="10" rx="2" /><path d="M8 11V7a4 4 0 0 1 8 0v4" /></Svg>,
  Eye:       (p) => <Svg {...p}><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" /><circle cx="12" cy="12" r="3" /></Svg>,
  Menu:      (p) => <Svg {...p}><path d="M3 6h18M3 12h18M3 18h18" /></Svg>,
  Move:      (p) => <Svg {...p}><path d="M5 9l-3 3 3 3M9 5l3-3 3 3M15 19l-3 3-3-3M19 9l3 3-3 3M2 12h20M12 2v20" /></Svg>,
  Download:  (p) => <Svg {...p}><path d="M12 3v12M7 10l5 5 5-5M5 21h14" /></Svg>,
  Pencil:    (p) => <Svg {...p}><path d="M17 3.5 20.5 7 7 20.5H3.5V17z" /><path d="M14 6.5 17.5 10" /></Svg>,
  Tag:       (p) => <Svg {...p}><path d="M3 12V4a1 1 0 0 1 1-1h8l8 8-9 9z" /><circle cx="8" cy="8" r="1.5" fill="currentColor"/></Svg>,
  Flash:     (p) => <Svg {...p}><path d="M13 3 4 14h7l-1 7 9-11h-7l1-7z" fill="currentColor"/></Svg>,
};

window.Icon = Icon;
