/* global React */
/* Lucide-style line icons — stroke 1.75, currentColor. Hand-built to avoid runtime deps. */
function Icon({ name, size = 24, stroke = 1.75, style, ...rest }) {
  const p = ICON_PATHS[name] || ICON_PATHS.circle;
  return (
    <svg
      width={size} height={size} viewBox="0 0 24 24" fill="none"
      stroke="currentColor" strokeWidth={stroke} strokeLinecap="round"
      strokeLinejoin="round" style={{ display: "block", flex: "0 0 auto", ...style }}
      aria-hidden="true" {...rest}
    >
      {p}
    </svg>
  );
}

const ICON_PATHS = {
  circle: <circle cx="12" cy="12" r="9" />,
  // navigation / ui
  arrowRight: <><line x1="5" y1="12" x2="19" y2="12" /><polyline points="12 5 19 12 12 19" /></>,
  arrowDown: <><line x1="12" y1="5" x2="12" y2="19" /><polyline points="19 12 12 19 5 12" /></>,
  chevronDown: <polyline points="6 9 12 15 18 9" />,
  chevronRight: <polyline points="9 6 15 12 9 18" />,
  menu: <><line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="18" x2="21" y2="18" /></>,
  x: <><line x1="18" y1="6" x2="6" y2="18" /><line x1="6" y1="6" x2="18" y2="18" /></>,
  check: <polyline points="20 6 9 17 4 12" />,
  plus: <><line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" /></>,
  minus: <line x1="5" y1="12" x2="19" y2="12" />,
  star: <polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" />,
  // specialty
  sparkles: <><path d="M12 3l1.8 4.7L18.5 9.5 13.8 11.3 12 16l-1.8-4.7L5.5 9.5l4.7-1.8L12 3z" /><path d="M19 14l.7 1.9 1.9.7-1.9.7-.7 1.9-.7-1.9-1.9-.7 1.9-.7.7-1.9z" /></>,
  trendingUp: <><polyline points="3 17 9 11 13 15 21 7" /><polyline points="15 7 21 7 21 13" /></>,
  leaf: <><path d="M11 20A7 7 0 0 1 4 13c0-5 4-9 16-9 0 9-4 16-9 16a7 7 0 0 1-2-.3" /><path d="M7 17c3-4 6-6 10-7" /></>,
  workflow: <><rect x="3" y="3" width="7" height="6" rx="1.5" /><rect x="14" y="15" width="7" height="6" rx="1.5" /><path d="M6.5 9v3a3 3 0 0 0 3 3h5" /></>,
  user: <><circle cx="12" cy="8" r="4" /><path d="M5 21a7 7 0 0 1 14 0" /></>,
  users: <><circle cx="9" cy="8" r="3.4" /><path d="M3 20a6 6 0 0 1 12 0" /><path d="M16 5.2a3.4 3.4 0 0 1 0 5.6" /><path d="M16.5 14.2A6 6 0 0 1 21 20" /></>,
  briefcase: <><rect x="3" y="7" width="18" height="13" rx="2" /><path d="M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" /><path d="M3 13h18" /></>,
  graduation: <><path d="M2 9l10-5 10 5-10 5L2 9z" /><path d="M6 11v5c0 1.1 2.7 2.5 6 2.5s6-1.4 6-2.5v-5" /><line x1="22" y1="9" x2="22" y2="14" /></>,
  target: <><circle cx="12" cy="12" r="9" /><circle cx="12" cy="12" r="5" /><circle cx="12" cy="12" r="1.4" /></>,
  // content
  play: <polygon points="8 5 19 12 8 19 8 5" />,
  playCircle: <><circle cx="12" cy="12" r="9" /><polygon points="10 8.5 16 12 10 15.5 10 8.5" /></>,
  heart: <path d="M12 20s-7-4.4-9.3-8.6C1 8 2.5 4.7 6 4.7c2 0 3.2 1.2 4 2.3.8-1.1 2-2.3 4-2.3 3.5 0 5 3.3 3.3 6.7C19 15.6 12 20 12 20z" />,
  bookmark: <path d="M6 3h12a1 1 0 0 1 1 1v17l-7-4-7 4V4a1 1 0 0 1 1-1z" />,
  eye: <><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7z" /><circle cx="12" cy="12" r="3" /></>,
  clock: <><circle cx="12" cy="12" r="9" /><polyline points="12 7 12 12 15.5 14" /></>,
  calendar: <><rect x="3" y="4.5" width="18" height="17" rx="2.5" /><line x1="3" y1="9.5" x2="21" y2="9.5" /><line x1="8" y1="2.5" x2="8" y2="6.5" /><line x1="16" y1="2.5" x2="16" y2="6.5" /></>,
  video: <><rect x="2.5" y="6" width="13" height="12" rx="2.5" /><path d="M16 10l5.5-3v10L16 14" /></>,
  award: <><circle cx="12" cy="9" r="5.5" /><path d="M8.5 13.5L7 22l5-3 5 3-1.5-8.5" /></>,
  infinity: <path d="M6 9c2.5 0 3.5 3 6 3s3.5-3 6-3a3 3 0 0 1 0 6c-2.5 0-3.5-3-6-3s-3.5 3-6 3a3 3 0 0 1 0-6z" />,
  download: <><path d="M12 3v12" /><polyline points="7 11 12 16 17 11" /><path d="M4 20h16" /></>,
  shield: <><path d="M12 3l8 3v5c0 5-3.5 8.5-8 10-4.5-1.5-8-5-8-10V6l8-3z" /><polyline points="9 12 11 14 15 10" /></>,
  lock: <><rect x="4.5" y="10.5" width="15" height="10" rx="2.5" /><path d="M8 10.5V7a4 4 0 0 1 8 0v3.5" /></>,
  mail: <><rect x="3" y="5" width="18" height="14" rx="2.5" /><polyline points="3.5 7 12 13 20.5 7" /></>,
  message: <path d="M21 11.5a8.5 8.5 0 0 1-12.5 7.5L3 21l1.5-5.5A8.5 8.5 0 1 1 21 11.5z" />,
  mapPin: <><path d="M12 21c5-5 8-8.5 8-12a8 8 0 1 0-16 0c0 3.5 3 7 8 12z" /><circle cx="12" cy="9" r="2.8" /></>,
  phone: <path d="M5 3h3.5l1.7 5-2.3 1.4a13 13 0 0 0 6.7 6.7l1.4-2.3 5 1.7V21a2 2 0 0 1-2 2A18 18 0 0 1 3 5a2 2 0 0 1 2-2z" />,
  zap: <polygon points="13 2 4 14 11 14 11 22 20 10 13 10 13 2" />,
  globe: <><circle cx="12" cy="12" r="9" /><path d="M3 12h18" /><path d="M12 3c2.8 2.4 4.2 5.6 4.2 9s-1.4 6.6-4.2 9c-2.8-2.4-4.2-5.6-4.2-9S9.2 5.4 12 3z" /></>,
  handshake: <><path d="M11 17l2 2 3-3" /><path d="M3 10l4-4 5 2 5-2 4 4-4 5-2.5-2.5" /><path d="M7 6v6" /></>,
  mic: <><rect x="9" y="2.5" width="6" height="11" rx="3" /><path d="M5.5 11a6.5 6.5 0 0 0 13 0" /><line x1="12" y1="17.5" x2="12" y2="21.5" /></>,
  lightbulb: <><path d="M9 18h6" /><path d="M10 21h4" /><path d="M12 3a6 6 0 0 0-4 10.5c.7.7 1 1.3 1 2.5h6c0-1.2.3-1.8 1-2.5A6 6 0 0 0 12 3z" /></>,
  layers: <><polygon points="12 3 21 8 12 13 3 8 12 3" /><polyline points="3 13 12 18 21 13" /></>,
  search: <><circle cx="11" cy="11" r="7" /><line x1="16.5" y1="16.5" x2="21" y2="21" /></>,
  chart: <><line x1="4" y1="20" x2="20" y2="20" /><rect x="6" y="11" width="3" height="6" /><rect x="11" y="7" width="3" height="10" /><rect x="16" y="13" width="3" height="4" /></>,
  filter: <polygon points="3 4 21 4 14 12.5 14 19.5 10 21 10 12.5 3 4" />,
  clipboardCheck: <><rect x="8.5" y="3" width="7" height="4" rx="1.4" /><path d="M8.5 5H6.5a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2" /><polyline points="9 13.5 11 15.5 15 10.5" /></>,
  building: <><path d="M3 21h18" /><rect x="6" y="3" width="12" height="18" rx="1.5" /><path d="M10 8h4M10 12h4M10 16h4" /></>,
  fileText: <><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z" /><polyline points="14 3 14 8 19 8" /><line x1="9" y1="13" x2="15" y2="13" /><line x1="9" y1="17" x2="13" y2="17" /></>,
  upload: <><path d="M12 15V3" /><polyline points="7 8 12 3 17 8" /><path d="M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4" /></>,
  route: <><circle cx="6" cy="19" r="2.5" /><circle cx="18" cy="5" r="2.5" /><path d="M8.5 19H15a3.5 3.5 0 0 0 0-7H9a3.5 3.5 0 0 1 0-7h6.5" /></>,
};

window.Icon = Icon;
