import { useState } from 'react' import { X, Sparkles } from 'lucide-react' import { cn } from '@/lib/utils' import { NodeSummary } from './NodeSummary' import { ChatTab } from './ChatTab' import { SuggestionsTab } from './SuggestionsTab' import type { EditorAIChatMessage, AISuggestion } from '@/types' interface EditorAIPanelProps { isOpen: boolean onClose: () => void focalNode?: { id: string; type: string; question?: string; title?: string; description?: string } | null flowName?: string flowType?: string nodeCount?: number messages: EditorAIChatMessage[] input: string onInputChange: (value: string) => void onSend: () => void isLoading: boolean suggestions: AISuggestion[] } type Tab = 'chat' | 'suggestions' export function EditorAIPanel({ isOpen, onClose, focalNode, flowName, flowType, nodeCount, messages, input, onInputChange, onSend, isLoading, suggestions, }: EditorAIPanelProps) { const [activeTab, setActiveTab] = useState('chat') if (!isOpen) return null const pendingCount = suggestions.filter((s) => s.status === 'pending').length return (
{/* Header */}
AI Assist
{/* Tabs */}
{activeTab === 'chat' ? ( ) : ( )}
) }