import { Routes, Route, Navigate } from "react-router-dom";
import Layout from "./Layout";
import PlanningAgent from "./pages/PlanningAgent";
import DevOpsAgent from "./pages/DevOpsAgent";
import QualityGate from "./pages/QualityGate";

import Home from "./pages/Home";

export default function App() {
  return (
    <Routes>
      <Route element={<Layout />}>
        <Route path="/" element={<Home />} />
        <Route path="/home" element={<Home />} />
        <Route path="/planning" element={<PlanningAgent />} />
        <Route path="/devops" element={<DevOpsAgent />} />
        <Route path="/quality" element={<Navigate to="/quality/dashboard" replace />} />
        <Route path="/quality/dashboard" element={<QualityGate view="dashboard" />} />
        <Route path="/quality/pr-list" element={<QualityGate view="pr-list" />} />
        <Route path="/quality/settings" element={<QualityGate view="settings" />} />
        <Route path="*" element={<Navigate to="/planning" replace />} />
      </Route>
    </Routes>
  );
}
