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

import { Article } from "@pages/Article/Article";
import { Auth } from "@pages/Auth/Auth";
import { AuthForCandidate } from "@pages/AuthForCandidate/AuthForCandidate";
import { Blog } from "@pages/Blog/Blog";
import CatalogSpecialists from "@pages/CatalogSpecialists/CatalogSpecialists";
import { CompanyInfo } from "@pages/CompanyInfo/CompanyInfo";
import { Forms } from "@pages/Forms/Forms";
import { FrequentlyAskedQuestion } from "@pages/FrequentlyAskedQuestion/FrequentlyAskedQuestion";
import { FrequentlyAskedQuestions } from "@pages/FrequentlyAskedQuestions/FrequentlyAskedQuestions";
import { Landing } from "@pages/Landing/Landing";
import { ProfileCandidate } from "@pages/ProfileCandidate/ProfileCandidate";
import { RegistrationForCandidate } from "@pages/RegistrationForCandidate/RegistrationForCandidate";
import { RegistrationSetting } from "@pages/RegistrationSetting/RegistrationSetting";
import { SingleReportPage } from "@pages/SingleReportPage/SingleReportPage";
import { Stack } from "@pages/Stack/Stack";
import { TrackerIntro } from "@pages/TrackerIntro/TrackerIntro";
import { WelcomePage } from "@pages/WelcomePage/WelcomePage";

import { FreeDevelopers } from "@components/FreeDevelopers/FreeDevelopers";

export const GuestPage = () => {
  return (
    <Routes>
      <Route exact path="/auth" element={<Auth />} />
      <Route exact path="/welcome-page" element={<WelcomePage />} />
      <Route exact path="/stack" element={<Stack />} />
      <Route exact path="/" element={<Landing />} />
      <Route path="*" element={<Navigate to="/auth" replace />} />
      <Route exact path="/tracker-intro" element={<TrackerIntro />} />
      <Route exact path="/forms" element={<Forms />} />
      <Route exact path="/company" element={<CompanyInfo />} />
      <Route
        exact
        path="/registration-setting"
        element={<RegistrationSetting />}
      />
      <Route
        exact
        path="/catalog-specialists"
        element={<CatalogSpecialists />}
      />
      <Route exact path="/worker/:id" element={<FreeDevelopers />} />
      <Route exact path="/auth-candidate" element={<AuthForCandidate />} />
      <Route
        exact
        path="/registration-candidate"
        element={<RegistrationForCandidate />}
      />

      <Route exact path="/blog" element={<Blog />}></Route>
      <Route exact path="/blog/article/:id" element={<Article />}></Route>
      <Route
        exact
        path="/frequently-asked-questions"
        element={<FrequentlyAskedQuestions />}
      />
      <Route
        exact
        path="/frequently-asked-question/:id"
        element={<FrequentlyAskedQuestion />}
      />

      <Route path="/report/:id" element={<SingleReportPage />} />
      <Route exact path="profile-candidate/:id">
        <Route index element={<ProfileCandidate />} />
      </Route>
    </Routes>
  );
};
