/* Icons — shared inline SVG components */
const Icon = ({ name, size = 18, stroke = 1.6, ...rest }) => {
  const paths = {
    arrow: <path d="M5 12h14M13 6l6 6-6 6" />,
    chevron: <path d="M6 9l6 6 6-6" />,
    radar: <><circle cx="12" cy="12" r="9" /><circle cx="12" cy="12" r="5" /><path d="M12 3v9l6 4" /></>,
    map: <><path d="M9 4 4 6v14l5-2 6 2 5-2V4l-5 2-6-2z" /><path d="M9 4v16M15 6v16" /></>,
    bolt: <path d="M13 3 4 14h6l-1 7 9-11h-6l1-7z" />,
    sparkles: <><path d="M12 3v6M12 15v6M3 12h6M15 12h6M5.6 5.6l4.2 4.2M14.2 14.2l4.2 4.2M18.4 5.6l-4.2 4.2M9.8 14.2l-4.2 4.2" /></>,
    target: <><circle cx="12" cy="12" r="9" /><circle cx="12" cy="12" r="5" /><circle cx="12" cy="12" r="1.5" fill="currentColor" stroke="none" /></>,
    layers: <><path d="m2 8 10-5 10 5-10 5z" /><path d="m2 14 10 5 10-5" /><path d="m2 11 10 5 10-5" /></>,
    waves: <><path d="M3 8c3-3 6-3 9 0s6 3 9 0" /><path d="M3 14c3-3 6-3 9 0s6 3 9 0" /></>,
    cpu: <><rect x="6" y="6" width="12" height="12" rx="2" /><rect x="9" y="9" width="6" height="6" rx="1" /><path d="M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3" /></>,
    rocket: <><path d="M14 4c5 0 6 1 6 6 0 5-1 6-6 6h-2L8 12V8l4-4z" /><path d="M9 15l-3 3 1 3 3-1M14 9h.01" /></>,
    calendar: <><rect x="3" y="5" width="18" height="16" rx="2" /><path d="M3 9h18M8 3v4M16 3v4" /></>,
    pin: <><path d="M12 21s-7-7.5-7-12a7 7 0 1 1 14 0c0 4.5-7 12-7 12z" /><circle cx="12" cy="9" r="2.5" /></>,
    twitter: <path d="M18 4h3l-7 8 8 10h-6l-5-6-6 6H2l8-9L2 4h6l4 5 6-5z" />,
    linkedin: <><rect x="3" y="3" width="18" height="18" rx="3" /><path d="M8 10v7M8 7v.01M12 17v-4a2 2 0 1 1 4 0v4M12 13v-3" /></>,
    youtube: <><rect x="3" y="6" width="18" height="12" rx="3" /><path d="m10 9 5 3-5 3z" fill="currentColor" stroke="none" /></>,
    play: <path d="M8 5v14l11-7z" fill="currentColor" stroke="none" />,
    check: <path d="m4 12 5 5L20 6" />,
    barchart: <><path d="M3 3v18h18" /><rect x="7" y="11" width="3" height="7" /><rect x="12" y="7" width="3" height="11" /><rect x="17" y="14" width="3" height="4" /></>,
    trend: <path d="m3 17 6-6 4 4 8-9M14 6h6v6" />,
    eye: <><path d="M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7z" /><circle cx="12" cy="12" r="3" /></>,
    shield: <path d="M12 3 4 6v6c0 5 4 8 8 9 4-1 8-4 8-9V6l-8-3z" />,
    plug: <><path d="M9 2v6M15 2v6M6 8h12v5a6 6 0 0 1-12 0z M12 19v3" /></>,
    cart: <><circle cx="9" cy="20" r="1.4" fill="currentColor" stroke="none" /><circle cx="18" cy="20" r="1.4" fill="currentColor" stroke="none" /><path d="M2 3h3l2.5 12h11l2-8H6" /></>,
    users: <><circle cx="9" cy="8" r="3.2" /><path d="M3 20c.6-3.4 3-5.2 6-5.2s5.4 1.8 6 5.2" /><path d="M16 5.2A3.2 3.2 0 0 1 19 11M18 20c-.3-2.3-1.4-3.9-3-4.8" /></>,
    handshake: <><path d="M12 8 9.5 5.5a2 2 0 0 0-2.8 0L3 9.2v5l2 2M12 8l2.5-2.5a2 2 0 0 1 2.8 0L21 9.2v5l-2 2" /><path d="M5 16.2l3 3a1.6 1.6 0 0 0 2.3 0l.7-.7.8.8a1.5 1.5 0 0 0 2.2 0l.7-.8.8.7" /></>,
    plus: <path d="M12 5v14M5 12h14" />,
    lock: <><rect x="4.5" y="10" width="15" height="10" rx="2" /><path d="M8 10V7a4 4 0 0 1 8 0v3" /><circle cx="12" cy="15" r="1.2" fill="currentColor" stroke="none" /></>,
    bulb: <><path d="M9 18h6M10 21h4" /><path d="M12 3a6 6 0 0 0-4 10.5c.6.6 1 1.4 1 2.3V16h6v-.2c0-.9.4-1.7 1-2.3A6 6 0 0 0 12 3z" /><path d="M12 3V1M4.5 6 3 4.5M19.5 6 21 4.5M4 11H2M22 11h-2" /></>,
    monitor: <><rect x="3" y="4" width="18" height="13" rx="2" /><path d="M8 21h8M12 17v4" /><circle cx="12" cy="13.5" r="0.6" fill="currentColor" /></>,
    calcheck: <><rect x="3" y="5" width="18" height="16" rx="2" /><path d="M3 9h18M8 3v4M16 3v4" /><path d="M9 14l2 2 4-4" /></>,
    medal: <><circle cx="12" cy="9" r="6" /><path d="m9 3-2 4M15 3l2 4" /><path d="M8.5 13.5 7 22l5-3 5 3-1.5-8.5" /><path d="m12 6 1 2 2 .2-1.5 1.4.4 2L12 12.6 10.1 13.6l.4-2L9 10.2 11 10z" /></>,
    beach: <><circle cx="17" cy="5" r="2" /><path d="M4 21c3-2 6-2 9 0" /><path d="M13 20 8 9" /><path d="M4.5 12.5c1-3 4-5 7-4.5s5 3.5 4.5 6.5c-2-1.6-4-2.4-6-2.4s-3.8.8-5.5 .4z" /></>,
    dollarcycle: <><path d="M20 12a8 8 0 0 1-8 8M4 12a8 8 0 0 1 8-8" /><path d="M20 6v3h-3M4 18v-3h3" /><path d="M14 9.5a2 2 0 0 0-2-1.5c-1.1 0-2 .7-2 1.6 0 2.2 4 1.1 4 3.4 0 .9-.9 1.6-2 1.6a2 2 0 0 1-2-1.5M12 7v10" /></>,
    megaphone: <><path d="M3 11v2a1 1 0 0 0 1 1h2l9 5V5L6 10H4a1 1 0 0 0-1 1z" /><path d="M18 8a4 4 0 0 1 0 8" /></>,
    compass: <><circle cx="12" cy="12" r="9" /><path d="m15.5 8.5-2 5-5 2 2-5 5-2z" /></>,
    book: <><path d="M4 5.5A2 2 0 0 1 6 4h13v14H6a2 2 0 0 0-2 2z" /><path d="M4 5.5V20" /></>,
    doc: <><path d="M7 3h7l5 5v13H7z" /><path d="M14 3v5h5M10 13h6M10 17h6" /></>,
    grid: <><rect x="4" y="4" width="7" height="7" rx="1.5" /><rect x="13" y="4" width="7" height="7" rx="1.5" /><rect x="4" y="13" width="7" height="7" rx="1.5" /><rect x="13" y="13" width="7" height="7" rx="1.5" /></>,
  };
  return (
    <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor"
      strokeWidth={stroke} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" {...rest}>
      {paths[name]}
    </svg>
  );
};

window.Icon = Icon;
