// icons.jsx — line-weight, editorial-feeling icons. Stroke 1.25, generous radii.

function Icon({ name, size = 18, stroke = 1.25, className = "", style = {} }) {
  const props = {
    width: size, height: size, viewBox: "0 0 24 24",
    fill: "none", stroke: "currentColor", strokeWidth: stroke,
    strokeLinecap: "round", strokeLinejoin: "round",
    className, style,
  };
  switch (name) {
    case "arrow-right":  return <svg {...props}><path d="M5 12h14M13 6l6 6-6 6"/></svg>;
    case "arrow-left":   return <svg {...props}><path d="M19 12H5M11 6l-6 6 6 6"/></svg>;
    case "arrow-up-right":return <svg {...props}><path d="M7 17 17 7M8 7h9v9"/></svg>;
    case "check":        return <svg {...props}><path d="M4 12l5 5L20 6"/></svg>;
    case "check-circle": return <svg {...props}><circle cx="12" cy="12" r="9"/><path d="M8 12l3 3 5-6"/></svg>;
    case "x":            return <svg {...props}><path d="M6 6l12 12M6 18 18 6"/></svg>;
    case "plus":         return <svg {...props}><path d="M12 5v14M5 12h14"/></svg>;
    case "search":       return <svg {...props}><circle cx="11" cy="11" r="7"/><path d="m20 20-3.5-3.5"/></svg>;
    case "globe":        return <svg {...props}><circle cx="12" cy="12" r="9"/><path d="M3 12h18M12 3a14 14 0 0 1 0 18M12 3a14 14 0 0 0 0 18"/></svg>;
    case "spark":        return <svg {...props}><path d="M12 3v6M12 15v6M3 12h6M15 12h6M5.6 5.6l4.2 4.2M14.2 14.2l4.2 4.2M5.6 18.4l4.2-4.2M14.2 9.8l4.2-4.2"/></svg>;
    case "github":       return <svg {...props}><path d="M9 19c-4 1-4-2-6-2m12 4v-3a3 3 0 0 0-1-2.5c3 0 6-2 6-5.5a4.3 4.3 0 0 0-1.2-3 4 4 0 0 0-.1-3s-1-.3-3.4 1.3a11.5 11.5 0 0 0-6.2 0C6.7 3.7 5.7 4 5.7 4a4 4 0 0 0-.1 3 4.3 4.3 0 0 0-1.2 3c0 3.5 3 5.5 6 5.5a3 3 0 0 0-1 2.5v3"/></svg>;
    case "linkedin":     return <svg {...props}><rect x="3" y="3" width="18" height="18" rx="2"/><path d="M8 10v7M8 7v.01M12 17v-4a2 2 0 0 1 4 0v4M12 13v4"/></svg>;
    case "file-text":    return <svg {...props}><path d="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><path d="M14 3v6h6M9 13h6M9 17h4"/></svg>;
    case "twitter":      return <svg {...props}><path d="M4 4l7.5 9.5L4.5 20h2l6-6.5L17 20h3l-7.8-9.8L19.5 4h-2l-5.4 5.8L8 4z"/></svg>;
    case "edit":         return <svg {...props}><path d="M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"/></svg>;
    case "send":         return <svg {...props}><path d="M22 2 11 13M22 2l-7 20-4-9-9-4z"/></svg>;
    case "eye":          return <svg {...props}><path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg>;
    case "eye-off":      return <svg {...props}><path d="M17.9 17.9A9.4 9.4 0 0 1 12 19c-6.5 0-10-7-10-7a16 16 0 0 1 4-4.6m4.4-2.2A9.4 9.4 0 0 1 12 5c6.5 0 10 7 10 7a16 16 0 0 1-2 2.7M2 2l20 20M9.9 9.9a3 3 0 0 0 4.2 4.2"/></svg>;
    case "settings":     return <svg {...props}><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 0 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-1.8-.3 1.6 1.6 0 0 0-1 1.5V21a2 2 0 0 1-4 0v-.1a1.6 1.6 0 0 0-1-1.5 1.6 1.6 0 0 0-1.8.3l-.1.1a2 2 0 0 1-2.8-2.8l.1-.1a1.6 1.6 0 0 0 .3-1.8 1.6 1.6 0 0 0-1.5-1H3a2 2 0 0 1 0-4h.1a1.6 1.6 0 0 0 1.5-1 1.6 1.6 0 0 0-.3-1.8l-.1-.1a2 2 0 0 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3h.1a1.6 1.6 0 0 0 1-1.5V3a2 2 0 0 1 4 0v.1a1.6 1.6 0 0 0 1 1.5 1.6 1.6 0 0 0 1.8-.3l.1-.1a2 2 0 0 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8v.1a1.6 1.6 0 0 0 1.5 1H21a2 2 0 0 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z"/></svg>;
    case "bell":         return <svg {...props}><path d="M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9M10.3 21a2 2 0 0 0 3.4 0"/></svg>;
    case "trend":        return <svg {...props}><path d="M22 7 13.5 15.5l-5-5L2 17M16 7h6v6"/></svg>;
    case "calendar":     return <svg {...props}><rect x="3" y="4" width="18" height="18" rx="2"/><path d="M16 2v4M8 2v4M3 10h18"/></svg>;
    case "briefcase":    return <svg {...props}><rect x="2" y="7" width="20" height="14" rx="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>;
    case "compass":      return <svg {...props}><circle cx="12" cy="12" r="9"/><path d="m16 8-2 6-6 2 2-6 6-2z"/></svg>;
    case "frame":        return <svg {...props}><path d="M22 6 12 13 2 6M22 6v12H2V6M22 6 2 6"/></svg>;
    case "handshake":    return <svg {...props}><path d="M11 17 9 19a2 2 0 1 1-3-3l4-4M14 14l3 3a2 2 0 1 0 3-3l-7-7H8L4 11l3 3M14 14l3-3"/></svg>;
    case "book":         return <svg {...props}><path d="M4 19.5V4a2 2 0 0 1 2-2h14v18H6a2 2 0 0 0-2 2"/><path d="M8 7h8M8 11h8"/></svg>;
    case "upload":       return <svg {...props}><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12"/></svg>;
    case "circle":       return <svg {...props}><circle cx="12" cy="12" r="9"/></svg>;
    case "circle-dot":   return <svg {...props}><circle cx="12" cy="12" r="9"/><circle cx="12" cy="12" r="3" fill="currentColor"/></svg>;
    case "menu":         return <svg {...props}><path d="M3 6h18M3 12h18M3 18h18"/></svg>;
    case "external":     return <svg {...props}><path d="M15 3h6v6M10 14 21 3M21 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5"/></svg>;
    case "lock":         return <svg {...props}><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg>;
    case "refresh":      return <svg {...props}><path d="M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5"/></svg>;
    case "user":         return <svg {...props}><circle cx="12" cy="8" r="4"/><path d="M4 21a8 8 0 0 1 16 0"/></svg>;
    case "users":        return <svg {...props}><path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.9M16 3a4 4 0 0 1 0 7.7"/></svg>;
    case "chart":        return <svg {...props}><path d="M3 3v18h18M7 14l3-3 4 4 5-6"/></svg>;
    case "cursor":       return <svg {...props}><path d="m4 4 7 16 2-7 7-2z"/></svg>;
    case "moon":         return <svg {...props}><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg>;
    default: return <svg {...props}><circle cx="12" cy="12" r="9"/></svg>;
  }
}

window.Icon = Icon;
