// Minimal line icons
const Icon = ({ name, size = 20 }) => {
  const common = { width: size, height: size, viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1, strokeLinecap: 'square', strokeLinejoin: 'miter' };
  switch (name) {
    case 'fund':
      return <svg {...common}><path d="M3 20V10M8 20V6M13 20V13M18 20V4M3 20h18" /></svg>;
    case 'crypto':
      return <svg {...common}><rect x="5" y="5" width="14" height="14" transform="rotate(45 12 12)" /><path d="M12 9v6M10 11h4M10 13h4" /></svg>;
    case 'startup':
      return <svg {...common}><path d="M12 3l8 14H4l8-14z" /><circle cx="12" cy="14" r="1.5" /></svg>;
    case 'group':
      return <svg {...common}><rect x="3" y="8" width="6" height="12" /><rect x="10.5" y="4" width="6" height="16" /><rect x="18" y="11" width="3" height="9" /></svg>;
    case 'family':
      return <svg {...common}><circle cx="7" cy="7" r="2.5" /><circle cx="17" cy="7" r="2.5" /><path d="M3 20v-2a4 4 0 014-4 4 4 0 014 4v2M13 20v-2a4 4 0 014-4 4 4 0 014 4v2" /></svg>;
    case 'person':
      return <svg {...common}><circle cx="12" cy="7" r="3" /><path d="M5 21v-2a7 7 0 0114 0v2" /></svg>;
    case 'globe':
      return <svg {...common}><circle cx="11" cy="12" r="8" /><path d="M3 12h16M11 4c2.5 3 2.5 13 0 16M11 4c-2.5 3-2.5 13 0 16" /><path d="M16 6l5 0M21 6l-2-2M21 6l-2 2" /></svg>;
    case 'growth':
      return <svg {...common}><path d="M3 20h18" /><path d="M5 17l5-5 4 3 6-8" /><path d="M14 7h6v6" /></svg>;
    case 'realestate':
      return <svg {...common}><path d="M3 21V10l9-6 9 6v11M9 21v-7h6v7" /></svg>;
    case 'exec':
      return <svg {...common}><circle cx="12" cy="8" r="3.5" /><path d="M5 21v-1a7 7 0 0114 0v1" /></svg>;
    case 'tech':
      return <svg {...common}><rect x="3" y="5" width="18" height="12" /><path d="M8 21h8M12 17v4" /></svg>;
    case 'arrow':
      return <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1"><path d="M5 12h14M13 6l6 6-6 6" /></svg>;
    case 'plus':
      return <svg {...common}><path d="M12 5v14M5 12h14" /></svg>;
    case 'logo':
      // User-supplied UF logomark
      return (
        <img src="assets/logo-uf.png" alt="uF" width={size} height={size}
        style={{ display: 'block', objectFit: 'contain', width: "50px", height: "50px" }} />);

    default:return null;
  }
};

window.Icon = Icon;