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

import { NotFoundPage } from "@/components/not-found.page";

import { MemberCardPage } from "./members/MemberCardPage";
import { MemberListPage } from "./members/MemberListPage";
import { OrganizationCardPage } from "./organizations/OrganizationCardPage";
import { OrganizationListPage } from "./organizations/OrganizationListPage";
import { UserCardPage } from "./users/UserCardPage";
import { UserListPage } from "./users/UserListPage";

export const AdministratorRoutes = () => {
	return (
		<Routes>
			<Route index element={<Navigate to="users" />} />
			<Route path="users" element={<UserListPage />} />
			<Route path="users/:id" element={<UserCardPage />} />
			<Route path="organizations" element={<OrganizationListPage />} />
			<Route
				path="organizations/:id"
				element={<OrganizationCardPage />}
			/>
			<Route
				path="organizations/:organizationId/members"
				element={<MemberListPage />}
			/>
			<Route
				path="organizations/:organizationId/members/:id"
				element={<MemberCardPage />}
			/>
			<Route path="*" element={<NotFoundPage />} />
		</Routes>
	);
};
