import "./App.css";
import { Routes, Route, BrowserRouter as Router, Navigate } from "react-router-dom";
import Navbar from '@/components/common/navbar/Navbar';
import Page from "@/components/pages/main/Page";
import Logs from "@/components/pages/logsPage/Logs";
import Vectorization from "./components/pages/vectorizationPage/Vectorization";
import { pdfjs } from "react-pdf";
import LLMConfigList from "./components/pages/llmConfigs/LlmConfigList";
import LlmPromptList from "./components/pages/llmPrompts/LlmPromptList";

pdfjs.GlobalWorkerOptions.workerSrc = new URL(
  "pdfjs-dist/build/pdf.worker.min.mjs",
  import.meta.url
).toString();

function App() {
  return (
    <Router>
      <Navbar />
        <Routes>
          {/* <Route path="" element={<Page />} /> */}
          <Route path="/logs" element={<Logs />} />
          {/* <Route path="/test" element={<TestPage />} /> */}
          <Route path="/docs" element={<Vectorization />} />
          <Route path="/llmconfig" element={<LLMConfigList />} />
          <Route path="/llmprompt" element={<LlmPromptList />} />
          {/* <Route path="/" element={<Navigate to="/logs" />} /> */}
        </Routes>
    </Router>
  );
}

export default App;
