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

import { NotFoundPage } from "@/components/not-found.page";
import { CheckListTablePage, CheckListCardPage } from "@/pages";

import { AccessCardPage } from "./accesses/AccessCardPage";
import { AccessListPage } from "./accesses/AccessListPage";
import { AlarmDescriptionCardPage } from "./alarm-description/AlarmDescriptionCardPage";
import { AlarmDescriptionListPage } from "./alarm-description/AlarmDescriptionListPage";
import { AreaCardPage } from "./areas/AreaCardPage";
import { AreaListPage } from "./areas/AreaListPage";
import { AssetGroupCardPage } from "./asset-groups/AssetGroupCardPage";
import { AssetGroupListPage } from "./asset-groups/AssetGroupListPage";
import { AssetCardPage } from "./assets/AssetCardPage";
import { AssetListPage } from "./assets/AssetListPage";
import { CameraCardPage } from "./cameras/CameraCardPage";
import { CameraListPage } from "./cameras/CameraListPage";
import { LockedEventCodeCardPage } from "./locked-event-codes/LockedEventCodeCardPage";
import { LockedEventCodeListPage } from "./locked-event-codes/LockedEventCodeListPage";
import { MemberCardPage } from "./members/MemberCardPage";
import { MemberListPage } from "./members/MemberListPage";
import { OrganizationCardPage } from "./organizations/OrganizationCardPage";
import { OrganizationListPage } from "./organizations/OrganizationListPage";
import { PhotoCardPage } from "./photos/PhotoCardPage";
import { PhotoListPage } from "./photos/PhotoListPage";
import { ResponsiblePersonCardPage } from "./responsible-persons/ResponsiblePersonCardPage";
import { ResponsiblePersonListPage } from "./responsible-persons/ResponsiblePersonListPage";
import { TokenCardPage } from "./tokens/TokenCardPage";
import { TokenListPage } from "./tokens/TokenListPage";
import { ZoneCardPage } from "./zones/ZoneCardPage";
import { ZoneListPage } from "./zones/ZoneListPage";

export const ManagerPage = () => {
	return (
		<Routes>
			<Route index element={<Navigate to="organizations" />} />
			<Route path="/organizations" Component={OrganizationListPage} />
			<Route path="/organizations/:id" Component={OrganizationCardPage} />
			<Route
				path="/organizations/:organizationId/tokens"
				Component={TokenListPage}
			/>
			<Route
				path="/organizations/:organizationId/tokens/:id"
				Component={TokenCardPage}
			/>
			<Route
				path="/organizations/:organizationId/asset-groups"
				Component={AssetGroupListPage}
			/>
			<Route
				path="/organizations/:organizationId/asset-groups/:id"
				Component={AssetGroupCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets"
				Component={AssetListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:id"
				Component={AssetCardPage}
			/>
			<Route
				path="/organizations/:organizationId/members"
				Component={MemberListPage}
			/>
			<Route
				path="/organizations/:organizationId/members/:id"
				Component={MemberCardPage}
			/>
			<Route
				path="/organizations/:organizationId/members/:memberId/accesses"
				Component={AccessListPage}
			/>
			<Route
				path="/organizations/:organizationId/members/:memberId/accesses/:id"
				Component={AccessCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/responsible-persons"
				Component={ResponsiblePersonListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/responsible-persons/:id"
				Component={ResponsiblePersonCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/photos"
				Component={PhotoListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/photos/:id"
				Component={PhotoCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/areas"
				Component={AreaListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/areas/:id"
				Component={AreaCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/areas/:areaId/zones"
				Component={ZoneListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/areas/:areaId/zones/:id"
				Component={ZoneCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/locked-event-codes"
				Component={LockedEventCodeListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/locked-event-codes/:id"
				Component={LockedEventCodeCardPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/cameras"
				Component={CameraListPage}
			/>
			<Route
				path="/organizations/:organizationId/assets/:assetId/cameras/:id"
				Component={CameraCardPage}
			/>
			<Route
				path="/organizations/:organizationId/alarm-description"
				Component={AlarmDescriptionListPage}
			/>
			<Route
				path="/organizations/:organizationId/alarm-description/:id"
				Component={AlarmDescriptionCardPage}
			/>

			<Route
				path="/organizations/:organizationId/check-list-templates"
				Component={CheckListTablePage}
			/>
			<Route
				path="/organizations/:organizationId/check-list-templates/:id"
				Component={CheckListCardPage}
			/>

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