import { Routes, Route } from 'react-router-dom'
import { ConfigProvider, RecordsProvider } from './context'
import { Layout } from './components/layout'
import { Dashboard, Upload, Records, Accounts, Config, S2AConfig, EmailConfig, Monitor, TeamProcess } from './pages'

function App() {
  return (
    <ConfigProvider>
      <RecordsProvider>
        <Routes>
          <Route path="/" element={<Layout />}>
            <Route index element={<Dashboard />} />
            <Route path="upload" element={<Upload />} />
            <Route path="records" element={<Records />} />
            <Route path="accounts" element={<Accounts />} />
            <Route path="monitor" element={<Monitor />} />
            <Route path="team" element={<TeamProcess />} />
            <Route path="config" element={<Config />} />
            <Route path="config/s2a" element={<S2AConfig />} />
            <Route path="config/email" element={<EmailConfig />} />
          </Route>
        </Routes>
      </RecordsProvider>
    </ConfigProvider>
  )
}

export default App
