// Compass · Icon set (lucide-style strokes, lightweight)
// Exposed on window so other Babel scripts can use them.
const Icon = ({ name, size = 16, strokeWidth = 1.6, style, className }) => {
  const paths = ICONS[name];
  if (!paths) return null;
  return (
    <svg
      width={size} height={size} viewBox="0 0 24 24"
      fill="none" stroke="currentColor"
      strokeWidth={strokeWidth} strokeLinecap="round" strokeLinejoin="round"
      style={style} className={className}
      aria-hidden="true"
    >
      {paths}
    </svg>
  );
};

const ICONS = {
  arrowRight: <path d="M5 12h14M13 6l6 6-6 6" />,
  arrowLeft: <path d="M19 12H5M11 6l-6 6 6 6" />,
  check: <path d="M5 12.5l4.5 4.5L19 7" />,
  checkSmall: <path d="M4 12l5 5L20 6" />,
  x: <path d="M6 6l12 12M18 6L6 18" />,
  plus: <path d="M12 5v14M5 12h14" />,
  minus: <path d="M5 12h14" />,
  chevronDown: <path d="M6 9l6 6 6-6" />,
  chevronRight: <path d="M9 6l6 6-6 6" />,
  chevronLeft: <path d="M15 6l-6 6 6 6" />,
  search: <g><circle cx="11" cy="11" r="7" /><path d="M21 21l-4.3-4.3" /></g>,
  spark: <path d="M12 3l1.6 4.8L18 9.4l-4.4 1.6L12 15.8l-1.6-4.8L6 9.4l4.4-1.6L12 3zM18 15l.9 2.1 2.1.9-2.1.9-.9 2.1-.9-2.1L15 18l2.1-.9L18 15zM5 14l.7 1.6 1.6.7-1.6.7L5 18.6l-.7-1.6L2.7 16.3l1.6-.7L5 14z" />,
  doc: <g><path d="M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z" /><path d="M14 3v6h6" /><path d="M8 13h8M8 17h6" /></g>,
  slides: <g><rect x="3" y="4" width="18" height="13" rx="1.5" /><path d="M8 21h8M12 17v4" /></g>,
  pdf: <g><path d="M14 3H6a2 2 0 00-2 2v14a2 2 0 002 2h12a2 2 0 002-2V9z" /><path d="M14 3v6h6" /></g>,
  beaker: <g><path d="M9 3h6M10 3v6L4 19a2 2 0 001.7 3h12.6a2 2 0 001.7-3L14 9V3" /></g>,
  building: <g><rect x="4" y="3" width="16" height="18" rx="1" /><path d="M9 7h2M13 7h2M9 11h2M13 11h2M9 15h2M13 15h2" /></g>,
  network: <g><circle cx="6" cy="6" r="2.5" /><circle cx="18" cy="6" r="2.5" /><circle cx="6" cy="18" r="2.5" /><circle cx="18" cy="18" r="2.5" /><path d="M8 6h8M6 8v8M18 8v8M8 18h8" /></g>,
  brain: <path d="M9 4a3 3 0 00-3 3 3 3 0 00-2 5 3 3 0 002 5 3 3 0 003 3 3 3 0 003-3V4 a3 3 0 00-3 0zM15 4a3 3 0 013 3 3 3 0 012 5 3 3 0 01-2 5 3 3 0 01-3 3 3 3 0 01-3-3" />,
  sparkle: <path d="M12 3l2 6 6 2-6 2-2 6-2-6-6-2 6-2 2-6z" />,
  clock: <g><circle cx="12" cy="12" r="9" /><path d="M12 7v5l3 2" /></g>,
  user: <g><circle cx="12" cy="8" r="4" /><path d="M4 21a8 8 0 0116 0" /></g>,
  bot: <g><rect x="4" y="7" width="16" height="13" rx="2" /><path d="M9 13h.01M15 13h.01" /><path d="M12 3v4" /><circle cx="12" cy="3" r="1" /></g>,
  edit: <g><path d="M3 21h4l11-11-4-4L3 17v4z" /><path d="M14 6l4 4" /></g>,
  trash: <g><path d="M4 7h16" /><path d="M10 11v6M14 11v6" /><path d="M5 7l1 13a2 2 0 002 2h8a2 2 0 002-2l1-13" /><path d="M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3" /></g>,
  download: <g><path d="M12 3v12M7 10l5 5 5-5" /><path d="M4 17v3a1 1 0 001 1h14a1 1 0 001-1v-3" /></g>,
  external: <g><path d="M14 4h6v6" /><path d="M20 4l-8 8" /><path d="M18 14v6H4V6h6" /></g>,
  copy: <g><rect x="8" y="8" width="12" height="12" rx="1.5" /><path d="M4 16V5a1 1 0 011-1h11" /></g>,
  comment: <path d="M21 15a3 3 0 01-3 3H8l-4 4V6a3 3 0 013-3h12a3 3 0 013 3v9z" />,
  reply: <g><path d="M9 17l-5-5 5-5" /><path d="M4 12h11a5 5 0 015 5v3" /></g>,
  send: <g><path d="M22 2L11 13" /><path d="M22 2l-7 20-4-9-9-4 20-7z" /></g>,
  grip: <g><circle cx="9" cy="6" r="0.8" fill="currentColor" stroke="none" /><circle cx="15" cy="6" r="0.8" fill="currentColor" stroke="none" /><circle cx="9" cy="12" r="0.8" fill="currentColor" stroke="none" /><circle cx="15" cy="12" r="0.8" fill="currentColor" stroke="none" /><circle cx="9" cy="18" r="0.8" fill="currentColor" stroke="none" /><circle cx="15" cy="18" r="0.8" fill="currentColor" stroke="none" /></g>,
  gear: <g><circle cx="12" cy="12" r="3" /><path d="M19 12a7 7 0 00-.1-1.2l2-1.5-2-3.4-2.4.9a7 7 0 00-2-1.2L14 3h-4l-.5 2.6a7 7 0 00-2 1.2l-2.4-.9-2 3.4 2 1.5A7 7 0 005 12c0 .4 0 .8.1 1.2l-2 1.5 2 3.4 2.4-.9a7 7 0 002 1.2L10 21h4l.5-2.6a7 7 0 002-1.2l2.4.9 2-3.4-2-1.5c.1-.4.1-.8.1-1.2z" /></g>,
  info: <g><circle cx="12" cy="12" r="9" /><path d="M12 11v5M12 8h.01" /></g>,
  alert: <g><path d="M12 3l10 18H2L12 3z" /><path d="M12 10v4M12 17v.01" /></g>,
  bookOpen: <g><path d="M12 6c-2-2-5-3-9-3v15c4 0 7 1 9 3" /><path d="M12 6c2-2 5-3 9-3v15c-4 0-7 1-9 3" /></g>,
  globe: <g><circle cx="12" cy="12" r="9" /><path d="M3 12h18M12 3a14 14 0 010 18M12 3a14 14 0 000 18" /></g>,
  pin: <g><path d="M12 22s7-7 7-12a7 7 0 00-14 0c0 5 7 12 7 12z" /><circle cx="12" cy="10" r="2.5" /></g>,
  filter: <path d="M3 5h18l-7 9v6l-4-2v-4L3 5z" />,
  refresh: <g><path d="M3 12a9 9 0 0115-6.7L21 8" /><path d="M21 3v5h-5" /><path d="M21 12a9 9 0 01-15 6.7L3 16" /><path d="M3 21v-5h5" /></g>,
  diamond: <path d="M12 3l9 9-9 9-9-9 9-9z" />,
  flame: <path d="M12 3s5 5 5 10a5 5 0 01-10 0c0-3 2-4 2-7 2 2 3 3 3 4-1-2 0-7 0-7z" />,
  link: <g><path d="M10 14a5 5 0 007 0l3-3a5 5 0 00-7-7l-1 1" /><path d="M14 10a5 5 0 00-7 0l-3 3a5 5 0 007 7l1-1" /></g>,
  calendar: <g><rect x="3" y="5" width="18" height="16" rx="1.5" /><path d="M3 10h18M8 3v4M16 3v4" /></g>,
  flag: <g><path d="M5 3v18" /><path d="M5 4h11l-2 4 2 4H5" /></g>,
  target: <g><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="5"/><circle cx="12" cy="12" r="1" fill="currentColor" stroke="none"/></g>,
  zap: <path d="M13 2L4 14h7l-1 8 9-12h-7l1-8z" />,
  layers: <g><path d="M12 3l9 5-9 5-9-5 9-5z" /><path d="M3 13l9 5 9-5M3 18l9 5 9-5" /></g>,
  list: <g><path d="M9 6h12M9 12h12M9 18h12" /><circle cx="5" cy="6" r="1" fill="currentColor" stroke="none" /><circle cx="5" cy="12" r="1" fill="currentColor" stroke="none" /><circle cx="5" cy="18" r="1" fill="currentColor" stroke="none" /></g>,
  table: <g><rect x="3" y="4" width="18" height="16" rx="1.5" /><path d="M3 10h18M3 15h18M9 4v16M15 4v16" /></g>,
  database: <g><ellipse cx="12" cy="5" rx="8" ry="3" /><path d="M4 5v14a8 3 0 0016 0V5" /><path d="M4 12a8 3 0 0016 0" /></g>,
  settings: <g><circle cx="12" cy="12" r="3" /><path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z" /></g>,
  logOut: <g><path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4" /><path d="M16 17l5-5-5-5" /><path d="M21 12H9" /></g>,
  paperclip: <path d="M21 11.5l-9.5 9.5a6 6 0 01-8.5-8.5L12.5 3a4 4 0 015.6 5.6L9 17.7a2 2 0 01-2.8-2.8L14.5 7" />,
  image: <g><rect x="3" y="3" width="18" height="18" rx="2" /><circle cx="8.5" cy="8.5" r="1.5" /><path d="M21 15l-5-5L5 21" /></g>,
  file: <g><path d="M13 3H7a2 2 0 00-2 2v14a2 2 0 002 2h10a2 2 0 002-2V9z" /><path d="M13 3v6h6" /></g>,
};

window.Icon = Icon;
