import React from 'react'; import { FaRobot, FaYoutube, FaBell, FaLightbulb, FaKeyboard, FaSearch, FaInfoCircle } from 'react-icons/fa'; import './NodeSelectionPanel.css'; const NodeSelectionPanel = ({ isOpen, onClose, agents, onSelectNode }) => { const nodeTypes = [ { id: 'input', label: 'Input Node', description: 'Add an input prompt for your podcast', constraint: 'Can only connect to Research Agent', icon: , color: '#6366F1', colorRgb: '99, 102, 241', subItems: null }, { id: 'agent', label: 'Agents Node', description: 'Add AI agents to process your content', constraint: 'Research Agent can receive from Input and connect to Agents or Insights. Regular Agents can only connect to Insights', icon: , color: '#10B981', colorRgb: '16, 185, 129', subItems: agents }, { id: 'insights', label: 'Insights Node', description: 'Add analytics and insights processing', constraint: 'Can receive from Agents or Research Agent and connect to Notify or Publish nodes', icon: , color: '#F59E0B', colorRgb: '245, 158, 11', subItems: null }, { id: 'notify', label: 'Notify Node', description: 'Add notifications and alerts', constraint: 'Can only receive from Insights nodes', icon: , color: '#EF4444', colorRgb: '239, 68, 68', subItems: null }, { id: 'publish', label: 'Publish Node', description: 'Publish to YouTube', constraint: 'Can only receive from Insights nodes', icon: , color: '#DC2626', colorRgb: '220, 38, 38', subItems: null } ]; if (!isOpen) return null; const handleNodeSelect = (nodeType, agentId = null) => { onSelectNode({ type: nodeType, agentId }); onClose(); }; return (
e.stopPropagation()}>

Add Node

{nodeTypes.map((nodeType) => (
nodeType.id !== 'agent' && handleNodeSelect(nodeType.id)} style={{ borderColor: nodeType.color }} >
{nodeType.icon}

{nodeType.label}

{nodeType.description}

{nodeType.constraint}
{nodeType.id === 'agent' && nodeType.subItems && (
{nodeType.subItems.map((agent) => (
handleNodeSelect('agent', agent.id)} > {agent.id === 'researcher' && } {agent.name} {agent.status}
))}
)}
))}
); }; export default NodeSelectionPanel;