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

import { OpenRequest } from "@pages/OpenRequests/OpenRequest";
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
import { Payouts } from "@pages/Payouts/Payouts";
import { Profile } from "@pages/Profile/Profile";
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
import { PassingTests } from "@pages/Quiz/PassingTests";
import { QuizPage } from "@pages/Quiz/QuizPage";
import { QuizReportPage } from "@pages/Quiz/QuizReportPage";
import Statistics from "@pages/Statistics/Statistics";
import { Summary } from "@pages/Summary/Summary";
import { Tracker } from "@pages/Tracker/Tracker";
import { ViewReport } from "@pages/ViewReport/ViewReport";

import { ProfileCalendar } from "@components/ProfileCalendar/ProfileCalendar";
import { ReportForm } from "@components/ReportForm/ReportForm";

export const DeveloperPage = () => {
  return (
    <Routes>
      <Route
        exact
        path="/tracker/project/:id/task/:taskId"
        element={<ProjectTracker />}
      />
      <Route exact path="/tracker/project/:id" element={<ProjectTracker />} />

      <Route exact path="profile">
        <Route index element={<Profile />} />
        <Route exact path="calendar" element={<ProfileCalendar />} />
        <Route exact path="calendar/report" element={<ReportForm />} />
        <Route exact path="calendar/view/:date/:id" element={<ViewReport />} />
        <Route exact path="open-requests" element={<OpenRequest />} />
        <Route exact path="summary" element={<Summary />} />
        <Route exact path="tracker" element={<Tracker />} />
        <Route exact path="statistics/:id" element={<Statistics />} />
        <Route exact path="payouts" element={<Payouts />} />
        <Route exact path="settings" element={<PartnerSettings />} />
        <Route exact path="treaties" element={<PartnerTreaties />} />
        <Route exact path="quiz">
          <Route index element={<QuizPage />} />
          <Route exact path="test/:uuid" element={<PassingTests />} />
          <Route exact path="report/:uuid" element={<QuizReportPage />} />
        </Route>
      </Route>
      {/* <Route path="*" element={<Navigate to="/profile" replace />} /> */}
    </Routes>
  );
};
