"use client"; import { useState, useRef, useEffect, FormEvent, FC } from 'react'; import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import clsx from 'clsx'; // --- TYPE DEFINITIONS --- interface Message { role: 'user' | 'assistant'; content: string; } // --- SVG ICONS --- const VedaMDLogo: FC = () => (

VedaMD

); const SettingsIcon: FC = () => ( ); const ArrowRightIcon: FC = () => ( ); // --- UI COMPONENTS --- const Header: FC = () => (
); const WelcomeScreen: FC<{ onTemplateClick: (query: string) => void }> = ({ onTemplateClick }) => { const templates = [ "What is the recommended antibiotic regimen for puerperal sepsis according to national guidelines?", "What are the steps for active management of the third stage of labor (AMTSL)", ]; return (

Welcome to VedaMD

Get trusted clinical answers based on Sri Lankan health guidelines

{templates.map((query) => ( ))}
); }; const ChatMessage: FC<{ message: Message }> = ({ message }) => { const isUser = message.role === 'user'; return (
{isUser ? 'U' : 'V'}
{message.content}
); }; const ChatForm: FC<{ input: string; setInput: (value: string) => void; handleSubmit: (e: FormEvent) => void; isLoading: boolean; }> = ({ input, setInput, handleSubmit, isLoading }) => (