import { BrowserRouter, Routes, Route } from "react-router-dom";
import { MissingPage } from "./pages/404";
import { Bot } from "./pages/Bot";
import { Bots } from "./pages/Bots";
import { Dashboard } from "./pages/Dashboard";
import { Layout } from "./pages/Layout";
import { Login } from "./pages/Login";
import { Settings } from "./pages/Settings";
import { Token } from "./pages/Token";
import { Tokens } from "./pages/Tokens";

function App() {
    return (
        <div>
            <BrowserRouter>
                <Routes>
                    <Route path="/logout" element={<Login />} />
                    <Route path="/login" element={<Login />} />
                    <Route path="/" element={<Layout />}>
                        <Route index element={<Dashboard />} />
                        <Route path="bots" element={<Bots />} />
                        <Route path="bot/:id" element={<Bot />} />
                        <Route path="tokens" element={<Tokens />} />
                        <Route path="token/:id" element={<Token />} />
                        <Route path="settings" element={<Settings />} />
                        <Route path="*" element={<MissingPage />} />
                    </Route>
                </Routes>
            </BrowserRouter>
        </div>
    )
}

export default App
