import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { BrowserRouter, Routes, Route } from "react-router";

import './index.css'
import App from './App.jsx'
import { Settings } from './pages/settings.jsx';
import { Flow } from './pages/flow.jsx';
import { Conversation } from './pages/conversation.jsx';
import { ChatProvider } from './util/useChat.jsx';

createRoot(document.getElementById('root')).render(
  <StrictMode>    
    
    <ChatProvider>
      <BrowserRouter>
          <App />
          <Routes>
            <Route path="/" element={<Conversation />} />
            <Route path="/flow" element={<Flow />} />
            <Route path="/settings" element={<Settings />} />
          </Routes>     
      </BrowserRouter>
    </ChatProvider>
    
  </StrictMode>,
)
