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

import { FormPage } from "@pages/FormPage/FormPage";
import { Home } from "@pages/Home/Home";
import { PartnerAddRequest } from "@pages/PartnerAddRequest/PartnerAddRequest";
import { PartnerBid } from "@pages/PartnerBid/PartnerBid";
import { PartnerEmployeeReport } from "@pages/PartnerEmployeeReport/PartnerEmployeeReport";
import { PartnerEmployees } from "@pages/PartnerEmployees/PartnerEmployees";
import { PartnerRequests } from "@pages/PartnerRequests/PartnerRequests";
import { PartnerSettings } from "@pages/PartnerSettings/PartnerSettings";
import { PartnerTreaties } from "@pages/PartnerTreaties/PartnerTreaties";
import { PartnerCategories } from "@pages/PartnerСategories/PartnerСategories";
import { Profile } from "@pages/Profile/Profile";
import { ProjectTracker } from "@pages/ProjectTracker/ProjectTracker";
import Statistics from "@pages/Statistics/Statistics";
import { Tracker } from "@pages/Tracker/Tracker";
import { ViewReport } from "@pages/ViewReport/ViewReport";

import { Calendar } from "@components/Calendar/Calendar";
import { Candidate } from "@components/Candidate/Candidate";
import { TicketFullScreen } from "@components/Modal/Tracker/TicketFullScreen/TicketFullScreen";

export const PartnerPage = () => {
  return (
    <Routes>
      <Route exact path="/candidate/:id" element={<Candidate />} />
      <Route exact path="/candidate/:id/form" element={<FormPage />} />
      <Route path="/:userId/calendar" element={<Calendar />} />

      <Route
        exact
        path="/tracker/task/:id"
        element={<TicketFullScreen />}
      ></Route>
      <Route exact path="/tracker/project/:id" element={<ProjectTracker />} />

      <Route exact path="profile">
        <Route index element={<Profile />} />
        <Route exact path="catalog" element={<Home />} />
        <Route exact path="calendar/view/:date/:id" element={<ViewReport />} />
        <Route exact path="tracker" element={<Tracker />} />
        <Route exact path="statistics/:id" element={<Statistics />} />
        <Route exact path="settings" element={<PartnerSettings />} />
        <Route exact path="requests" element={<PartnerRequests />} />
        <Route exact path="requests-add" element={<PartnerAddRequest />} />
        <Route exact path="requests-edit" element={<PartnerAddRequest />} />
        <Route exact path="requests-bid" element={<PartnerBid />} />
        <Route exact path="employees" element={<PartnerCategories />} />
        <Route
          exact
          path="employees/report/:uuid"
          element={<PartnerEmployeeReport />}
        />
        <Route exact path="treaties" element={<PartnerTreaties />} />
        <Route
          exact
          path="categories/employees"
          element={<PartnerEmployees />}
        />
      </Route>
      <Route path="*" element={<Navigate to="/profile" replace />} />
    </Routes>
  );
};
