import { Routes, Route, Navigate } from "react-router-dom";
import Chrome from "./components/Chrome";
import { AIProvider } from "./context/AIContext";
import Home from "./pages/Home";
import Market from "./pages/Market";
import Settings from "./pages/Settings";
import Profile from "./pages/Profile";
import Research from "./pages/Research";
import Skills from "./pages/Skills";
import Patterns from "./pages/Patterns";
import Journal from "./pages/Journal";

export default function App() {
  return (
    <AIProvider>
    <Routes>
      <Route element={<Chrome />}>
        <Route path="/" element={<Home />} />
        <Route path="/market" element={<Market />} />
        <Route path="/settings" element={<Settings />} />
        <Route path="/research" element={<Research />} />
        <Route path="/skills" element={<Skills />} />
        <Route path="/patterns" element={<Patterns />} />
        <Route path="/journal" element={<Journal />} />
        <Route path="/profile" element={<Profile />} />
        <Route path="*" element={<Navigate to="/" replace />} />
      </Route>
    </Routes>
    </AIProvider>
  );
}
