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

import { LoginPage } from "@/pages";

import { AuthorizedRoutes } from "./AuthorizedRoutes";
import { AccessDeniedPage } from "./common-pages/AccessDeniedPage";
import { UnauthorizedPage } from "./common-pages/UnauthorizedPage";
import { NotFoundPage } from "./not-found.page";

export const AppRoutes = () => {
	return (
		<Routes>
			<Route index element={<Navigate to="/login" />} />
			<Route path="/login" element={<LoginPage />} />
			<Route path="/app/*" element={<AuthorizedRoutes />} />
			<Route path="/401" element={<UnauthorizedPage />} />
			<Route path="/403" element={<AccessDeniedPage />} />

			<Route path="*" element={<NotFoundPage />} />
		</Routes>
	);
};
