interface AssistantSidebarProps { isRTL: boolean t: (key: string) => string assistantHistory: { role: string; content: string }[] assistantMessage: string setAssistantMessage: (msg: string) => void onAskAssistant: () => void onClose: () => void } export function AssistantSidebar({ isRTL, t, assistantHistory, assistantMessage, setAssistantMessage, onAskAssistant, onClose, }: AssistantSidebarProps) { return (

{t('fa_assistant_title')}

{/* Chat History */}
{assistantHistory.length === 0 && (

{t('fa_assistant_placeholder')}

)} {assistantHistory.map((msg, idx) => (
{msg.content}
))}
{/* Input */}
setAssistantMessage(e.target.value)} onKeyDown={(e) => e.key === 'Enter' && onAskAssistant()} placeholder={t('fa_assistant_placeholder')} className="flex-1 px-3 py-2 border border-slate-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500" />
) }