import React, { useState } from 'react'; import { Card } from '../ui'; interface HelpSection { title: string; content: string; icon: string; } const helpSections: HelpSection[] = [ { title: 'Getting Started', icon: '🚀', content: `Think of yourself as a junior doctor in an Indian government hospital. You're managing a real patient with the help of the hospital team. Click any tab above the message box to choose who to talk to, then type your question and press Enter.` }, { title: 'Who Can Help You', icon: '👥', content: `• **Patient**: The person you're treating. Speaks in simple Hindi/English. May be anxious or in pain. • **Family**: Relative with the patient. Very emotional, speaks Hinglish, knows patient's habits and history. • **Nurse Priya**: Your eyes and ears. She monitors vitals, notices changes, administers treatments. • **Lab Tech Ramesh**: Handles all tests. Ask him about sample collection and when results will be ready. • **Dr. Sharma**: Senior doctor who guides you with questions, not answers. Helps you think critically.` }, { title: 'What You Can Do', icon: '⚕️', content: `• **Talk**: Click a person's tab, type your question, press Enter • **Examine**: Click "Examine" tab to check specific body systems • **Order Tests**: Click "Investigate" to order blood tests, X-rays, ECG, etc. • **Give Treatment**: Click "Treat" to start medications or procedures • **Team Discussion**: Click "Huddle" for everyone to discuss together` }, { title: 'Reading the Vitals', icon: '❤️', content: `The vitals panel shows live patient data that updates every 5 seconds - just like a real monitor! • Green numbers = normal • Yellow/amber = concerning, needs attention • Red = critical, act fast! • Arrows (↑↓) show if values are trending up or down` }, { title: 'Waiting for Tests', icon: '⏰', content: `Just like real hospitals, tests take time: • CBC: ~20 minutes • X-ray: ~30 minutes • CT scan: ~45 minutes Click "Wait for Results" to advance time by 30 minutes if you're waiting for tests.` }, { title: 'Success Tips', icon: '💡', content: `• Start by talking to the patient about their symptoms • Ask the family for background - they know things the patient won't tell • Check with Nurse Priya about vitals trends and observations • When stuck, consult Dr. Sharma - he'll guide your thinking • Order relevant tests early - they take time • Don't forget to examine the patient!` } ]; export const InlineHelpPanel: React.FC = () => { const [isOpen, setIsOpen] = useState(false); const [activeSection, setActiveSection] = useState(0); return ( <> {/* Help Toggle Button - Fixed position */} {/* Help Panel - Slides in from right */}
{/* Header */}

Quick Help

Interactive guide for multi-agent simulation

{/* Section Tabs */}
{helpSections.map((section, index) => ( ))}
{/* Content */}

{helpSections[activeSection].icon} {helpSections[activeSection].title}

{helpSections[activeSection].content.split('•').map((line, i) => { if (i === 0) return

{line}

; const [title, ...rest] = line.split(':'); return (
• {title}: {rest.join(':')}
); })}
{/* Context-sensitive tips */}
Quick Start

You're a junior doctor managing this patient. Start by clicking "Patient" tab above and ask "How are you feeling?" to begin your assessment.

{/* Footer */}

Press ? to toggle help

{/* Overlay when help is open */} {isOpen && (
setIsOpen(false)} /> )} ); }; export default InlineHelpPanel;