import { Handle, Position } from 'reactflow'; const TYPE_STYLES = { error: { symbol: 'ERR', bg: '#ef444420', border: '#ef4444' }, fix: { symbol: 'FIX', bg: '#10b98120', border: '#10b981' }, escalation: { symbol: 'ESC', bg: '#f59e0b20', border: '#f59e0b' }, resolution: { symbol: 'RES', bg: '#3b82f620', border: '#3b82f6' }, fork: { symbol: 'FRK', bg: '#a855f720', border: '#a855f7' }, }; export default function CustomNode({ data }) { const { label, nodeType, detail, color } = data; const style = TYPE_STYLES[nodeType] || { symbol: '---', bg: '#71717a20', border: '#71717a' }; return (
{style.symbol} {label} {data.points !== undefined && ( 0 ? 'text-emerald-400' : 'text-red-400'}`}> {data.points > 0 ? '+' : ''}{data.points.toFixed(2)} )}
{detail && (

{detail.replace(/\*\*/g, '').replace(/\*/g, '')}

)}
); }