// Small shared primitives — ground-transport sub-hub
const { useState, useEffect, useRef, useMemo } = React;

const Icon = ({ name, size = 18 }) => {
  const paths = {
    search: <path d="M11 2a9 9 0 1 0 5.3 16.3l5 5 1.4-1.4-5-5A9 9 0 0 0 11 2zm0 2a7 7 0 1 1 0 14 7 7 0 0 1 0-14z"/>,
    globe: <path d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zM2 12h20M12 2a15 15 0 0 1 0 20M12 2a15 15 0 0 0 0 20" fill="none" stroke="currentColor" strokeWidth="1.5"/>,
    chevron: <path d="M6 9l6 6 6-6" fill="none" stroke="currentColor" strokeWidth="1.8"/>,
    arrow: <path d="M5 12h14m-6-6l6 6-6 6" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/>,
    arrowLeft: <path d="M19 12H5m6 6l-6-6 6-6" fill="none" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round"/>,
    train: <path d="M4 16V8a4 4 0 0 1 4-4h8a4 4 0 0 1 4 4v8l-2 3H6l-2-3zm4 0h8M8 4v8m8-8v8M4 12h16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>,
    car: <path d="M5 13l2-5h10l2 5M3 13h18v5H3v-5zm5 5v2m8-2v2M5 13h2m10 0h2" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>,
    bus: <path d="M4 6a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v10l-2 3H6l-2-3V6zm0 7h16M8 6v7m8-7v7M8 17v2m8-2v2" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>,
    ticket: <path d="M2 9a1 1 0 0 1 1-1h18a1 1 0 0 1 1 1v2a2 2 0 0 0 0 4v2a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1v-2a2 2 0 0 0 0-4V9zm6 3h8" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>,
  };
  return <svg width={size} height={size} viewBox="0 0 24 24" fill="currentColor">{paths[name]}</svg>;
};

Object.assign(window, { Icon });
