import { memo, useState } from 'react'; interface ExpertKeywordNodeProps { data: { label: string; expertName: string; expertId: string; color: string; isDark: boolean; }; } export const ExpertKeywordNode = memo(({ data }: ExpertKeywordNodeProps) => { const { label, expertName, color, isDark } = data; const [isHovered, setIsHovered] = useState(false); return (
setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} style={{ position: 'relative', display: 'flex', flexDirection: 'column', gap: 4, padding: '6px 12px', paddingRight: '36px', marginTop: 18, borderRadius: 6, background: isDark ? 'linear-gradient(135deg, rgba(24, 144, 255, 0.15) 0%, rgba(255, 255, 255, 0.1) 100%)' : 'linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(0, 0, 0, 0.03) 100%)', border: `2px solid ${color}`, borderWidth: isHovered ? 3 : 2, color: isDark ? '#fff' : '#333', fontSize: '13px', fontWeight: 500, textAlign: 'center', cursor: 'pointer', transition: 'all 0.2s ease', whiteSpace: 'nowrap', userSelect: 'none', filter: isHovered ? 'brightness(1.1)' : 'none', boxShadow: isDark ? '0 2px 8px rgba(24, 144, 255, 0.2)' : '0 2px 8px rgba(24, 144, 255, 0.15)', }} > {/* Expert Badge - positioned above the node */}
{expertName}
{/* Keyword Label */}
{label}
{/* NEW Badge - positioned below the node */} NEW
); }); ExpertKeywordNode.displayName = 'ExpertKeywordNode';