import { Route, Routes } from "react-router";

import { ChatPage } from "./features/chat/ChatPage";
import { DashboardPage } from "./features/dashboard";
import { InboxPage } from "./features/inbox";
import { ModelsPage } from "./features/models";
import { NotFoundPage } from "./features/not-found";
import { ProjectsPage } from "./features/projects";
import { AdminConsoleLayout } from "./layouts/admin-layout/AdminConsoleLayout";
import { WorkbenchProjectGate } from "./layouts/workbench-layout/WorkbenchProjectGate";

export function AppRoutes() {
  return (
    <Routes>
      <Route element={<AdminConsoleLayout />}>
        <Route element={<DashboardPage />} path="/" />
        <Route element={<ProjectsPage />} path="/projects" />
        <Route element={<ModelsPage />} path="/models" />
      </Route>
      <Route element={<WorkbenchProjectGate />} path="/workbench/:projectId">
        <Route element={<ChatPage />} path="" />
        <Route element={<ChatPage />} path="chat" />
        <Route element={<InboxPage />} path="inbox" />
      </Route>
      <Route element={<NotFoundPage />} path="*" />
    </Routes>
  );
}
