import { Suspense, lazy } from 'react'
import { BrowserRouter, Navigate, Route, Routes } from 'react-router-dom'
import { AuthProvider } from './auth/AuthProvider'
import { RequireAuth } from './auth/RequireAuth'
import { GlobalTableSorting } from './components/GlobalTableSorting'
import './App.css'

const PublicLayout = lazy(() =>
  import('./layout/PublicLayout').then((m) => ({ default: m.PublicLayout })),
)
const ManagementLayout = lazy(() =>
  import('./layout/ManagementLayout').then((m) => ({ default: m.ManagementLayout })),
)
const MainLayout = lazy(() =>
  import('./layout/MainLayout').then((m) => ({ default: m.MainLayout })),
)
const HomePage = lazy(() => import('./pages/HomePage').then((m) => ({ default: m.HomePage })))
const LoginPage = lazy(() => import('./pages/LoginPage').then((m) => ({ default: m.LoginPage })))
const RegisterPage = lazy(() =>
  import('./pages/RegisterPage').then((m) => ({ default: m.RegisterPage })),
)
const ForgotPasswordPage = lazy(() =>
  import('./pages/ForgotPasswordPage').then((m) => ({ default: m.ForgotPasswordPage })),
)
const WelcomeBackPage = lazy(() =>
  import('./pages/user/WelcomeBackPage').then((m) => ({ default: m.WelcomeBackPage })),
)
const LoginActivityPage = lazy(() =>
  import('./pages/user/LoginActivityPage').then((m) => ({ default: m.LoginActivityPage })),
)
const UserListPage = lazy(() =>
  import('./pages/user/UserListPage').then((m) => ({ default: m.UserListPage })),
)
const UserCreatePage = lazy(() =>
  import('./pages/user/UserCreatePage').then((m) => ({ default: m.UserCreatePage })),
)
const UserEditPage = lazy(() =>
  import('./pages/user/UserEditPage').then((m) => ({ default: m.UserEditPage })),
)
const ResetPasswordPage = lazy(() =>
  import('./pages/user/ResetPasswordPage').then((m) => ({ default: m.ResetPasswordPage })),
)
const ConfirmEmailChangePage = lazy(() =>
  import('./pages/user/ConfirmEmailChangePage').then((m) => ({ default: m.ConfirmEmailChangePage })),
)
const SetPasswordPage = lazy(() =>
  import('./pages/user/SetPasswordPage').then((m) => ({ default: m.SetPasswordPage })),
)
const SetAuthorizedUserPasswordPage = lazy(() =>
  import('./pages/user/SetAuthorizedUserPasswordPage').then((m) => ({
    default: m.SetAuthorizedUserPasswordPage,
  })),
)
const PasswordSetSuccessPage = lazy(() =>
  import('./pages/user/PasswordSetSuccessPage').then((m) => ({ default: m.PasswordSetSuccessPage })),
)
const InvalidTokenPage = lazy(() =>
  import('./pages/errors/InvalidTokenPage').then((m) => ({ default: m.InvalidTokenPage })),
)
const AccessDeniedPage = lazy(() =>
  import('./pages/errors/AccessDeniedPage').then((m) => ({ default: m.AccessDeniedPage })),
)
const AdminDocs = lazy(() => import('./pages/AdminDocs').then((m) => ({ default: m.AdminDocs })))
const SwaggerDocs = lazy(() =>
  import('./pages/SwaggerDocs').then((m) => ({ default: m.SwaggerDocs })),
)
const RoleSelectPage = lazy(() =>
  import('./pages/RoleSelectPage').then((m) => ({ default: m.RoleSelectPage })),
)
const AppHome = lazy(() => import('./pages/AppHome').then((m) => ({ default: m.AppHome })))
const AdminLandingDashboardPage = lazy(() =>
  import('./pages/landing/AdminLandingDashboardPage').then((m) => ({ default: m.AdminLandingDashboardPage })),
)
const ViewRouteSitemapPage = lazy(() =>
  import('./pages/ViewRouteSitemapPage').then((m) => ({ default: m.ViewRouteSitemapPage })),
)
const ViewRoutePlaceholderPage = lazy(() =>
  import('./pages/ViewRoutePlaceholderPage').then((m) => ({ default: m.ViewRoutePlaceholderPage })),
)
const SchoolYearsManagementPage = lazy(() =>
  import('./pages/administrator/SchoolYearsManagementPage').then((m) => ({
    default: m.SchoolYearsManagementPage,
  })),
)
const NavBuilderPage = lazy(() =>
  import('./pages/NavBuilderPage').then((m) => ({ default: m.NavBuilderPage })),
)
const AdminBroadcastEmailPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({ default: m.AdminBroadcastEmailPage })),
)
const AdminCalendarPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({ default: m.AdminCalendarPage })),
)
const AdminCalendarViewPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({ default: m.AdminCalendarViewPage })),
)
const AdminCalendarAddEventPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminCalendarAddEventPage,
  })),
)
const AdminCalendarEditPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({ default: m.AdminCalendarEditPage })),
)
const AdminClassAssignmentPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminClassAssignmentPage,
  })),
)
const AdminClassSectionPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({ default: m.AdminClassSectionPage })),
)
const AdminClassWarningModalPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminClassWarningModalPage,
  })),
)
const AdminCourseMaterialsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminCourseMaterialsPage,
  })),
)
const AdminDailyAttendancePage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminDailyAttendancePage,
  })),
)
const AdminDailyAttendanceAnalysisPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminDailyAttendanceAnalysisPage,
  })),
)
const AdminExamDraftsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminExamDraftsPage,
  })),
)
const AdminGradingManagementPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminGradingManagementPage,
  })),
)
const AdminIpBansPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminIpBansPage,
  })),
)
const AdminLateSlipLogsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminLateSlipLogsPage,
  })),
)
const AdminManageUsersPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminManageUsersPage,
  })),
)
const AdminNotificationsAlertsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminNotificationsAlertsPage,
  })),
)
const AdminParentProfilePage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminParentProfilePage,
  })),
)
const AdminPaypalTransactionsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminPaypalTransactionsPage,
  })),
)
const AdminPrintNotificationAdminsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminPrintNotificationAdminsPage,
  })),
)
const AdminRemovedStudentsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminRemovedStudentsPage,
  })),
)
const AdminSearchResultsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminSearchResultsPage,
  })),
)
const AdminSectionsAutoDistributePage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminSectionsAutoDistributePage,
  })),
)
const AdminSectionsPromotionTotalsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminSectionsPromotionTotalsPage,
  })),
)
const AdminStudentClassAssignmentPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminStudentClassAssignmentPage,
  })),
)
const AdminStudentProfilesPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminStudentProfilesPage,
  })),
)
const AdminSubjectCurriculumPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminSubjectCurriculumPage,
  })),
)
const AdminTeacherClassAssignmentPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminTeacherClassAssignmentPage,
  })),
)
const AdminTeacherSubmissionsPage = lazy(() =>
  import('./pages/AdministratorToolPages').then((m) => ({
    default: m.AdminTeacherSubmissionsPage,
  })),
)
const CompetitionWinnersIndexPage = lazy(() =>
  import('./pages/winners/CompetitionWinnerPages').then((m) => ({
    default: m.CompetitionWinnersIndexPage,
  })),
)
const CompetitionWinnerFormPage = lazy(() =>
  import('./pages/winners/CompetitionWinnerPages').then((m) => ({
    default: m.CompetitionWinnerFormPage,
  })),
)
const CompetitionWinnerScoresPage = lazy(() =>
  import('./pages/winners/CompetitionWinnerPages').then((m) => ({
    default: m.CompetitionWinnerScoresPage,
  })),
)
const CompetitionWinnerPreviewPage = lazy(() =>
  import('./pages/winners/CompetitionWinnerPages').then((m) => ({
    default: m.CompetitionWinnerPreviewPage,
  })),
)
const CompetitionWinnerWinnersPage = lazy(() =>
  import('./pages/winners/CompetitionWinnerPages').then((m) => ({
    default: m.CompetitionWinnerWinnersPage,
  })),
)
const AdminClassProgressListPage = lazy(() =>
  import('./pages/AdminProgressPages').then((m) => ({
    default: m.AdminClassProgressListPage,
  })),
)
const AdminClassProgressViewPage = lazy(() =>
  import('./pages/AdminProgressPages').then((m) => ({
    default: m.AdminClassProgressViewPage,
  })),
)
const AdminStudentScoreCardPage = lazy(() =>
  import('./pages/AdminProgressPages').then((m) => ({
    default: m.AdminStudentScoreCardPage,
  })),
)
const AdminEmergencyContactIndexPage = lazy(() =>
  import('./pages/AdminProgressPages').then((m) => ({
    default: m.AdminEmergencyContactIndexPage,
  })),
)
const AdminEmergencyContactEditPage = lazy(() =>
  import('./pages/AdminProgressPages').then((m) => ({
    default: m.AdminEmergencyContactEditPage,
  })),
)
const AdminsAttendanceFormPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AdminsAttendanceFormPage })),
)
const AdministratorAbsencePage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AdministratorAbsencePage })),
)
const AttendanceTrackingPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AttendanceTrackingPage })),
)
const AttendanceManagementPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AttendanceManagementPage })),
)
const BadgeScanningListPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.BadgeScanningListPage })),
)
const ComposeAttendanceEmailPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.ComposeAttendanceEmailPage })),
)
const EarlyDismissalsPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.EarlyDismissalsPage })),
)
const EarlyDismissalsAddPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.EarlyDismissalsAddPage })),
)
const ParentAttendanceReportsAdminPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.ParentAttendanceReportsAdminPage })),
)
const TeacherAttendanceFormPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.TeacherAttendanceFormPage })),
)
const TeacherAttendanceMonthPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.TeacherAttendanceMonthPage })),
)
const AttendanceStudentViolationsViewPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AttendanceStudentViolationsViewPage })),
)
const ViolationsPendingPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.ViolationsPendingPage })),
)
const ViolationsNotifiedPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.ViolationsNotifiedPage })),
)
const AttendanceViolationsHubPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AttendanceViolationsHubPage })),
)
const AttendanceTemplatesIndexPage = lazy(() =>
  import('./pages/attendance').then((m) => ({ default: m.AttendanceTemplatesIndexPage })),
)
const ClassPrepListPage = lazy(() =>
  import('./pages/classPrep/ClassPrepListPage').then((m) => ({ default: m.ClassPrepListPage })),
)
const ClassPrepPrintPage = lazy(() =>
  import('./pages/classPrep/ClassPrepPrintPage').then((m) => ({ default: m.ClassPrepPrintPage })),
)
const CommunicationsIndexPage = lazy(() =>
  import('./pages/communications/CommunicationsIndexPage').then((m) => ({
    default: m.CommunicationsIndexPage,
  })),
)
const ConfigurationViewPage = lazy(() =>
  import('./pages/configuration/ConfigurationViewPage').then((m) => ({
    default: m.ConfigurationViewPage,
  })),
)
const DiscountListPage = lazy(() =>
  import('./pages/discounts/DiscountListPage').then((m) => ({ default: m.DiscountListPage })),
)
const DiscountCreatePage = lazy(() =>
  import('./pages/discounts/DiscountCreatePage').then((m) => ({ default: m.DiscountCreatePage })),
)
const DiscountApplyVoucherPage = lazy(() =>
  import('./pages/discounts/DiscountApplyVoucherPage').then((m) => ({
    default: m.DiscountApplyVoucherPage,
  })),
)
const ReverseDiscountPage = lazy(() =>
  import('./pages/discounts/ReverseDiscountPage').then((m) => ({ default: m.ReverseDiscountPage })),
)
const RegisteredStudentsPage = lazy(() =>
  import('./pages/enrollWithdraw/RegisteredStudentsPage').then((m) => ({
    default: m.RegisteredStudentsPage,
  })),
)
const EnrollmentWithdrawalPage = lazy(() =>
  import('./pages/enrollWithdraw/EnrollmentWithdrawalPage').then((m) => ({
    default: m.EnrollmentWithdrawalPage,
  })),
)
const ExpensesIndexPage = lazy(() =>
  import('./pages/expenses/ExpensesIndexPage').then((m) => ({ default: m.ExpensesIndexPage })),
)
const ExpenseCreatePage = lazy(() =>
  import('./pages/expenses/ExpenseCreatePage').then((m) => ({ default: m.ExpenseCreatePage })),
)
const ExpenseEditPage = lazy(() =>
  import('./pages/expenses/ExpenseEditPage').then((m) => ({ default: m.ExpenseEditPage })),
)
const FlagsManagementPage = lazy(() =>
  import('./pages/flags/FlagsManagementPage').then((m) => ({ default: m.FlagsManagementPage })),
)
const ProcessedFlagsPage = lazy(() =>
  import('./pages/flags/ProcessedFlagsPage').then((m) => ({ default: m.ProcessedFlagsPage })),
)
const IncidentAnalysisPage = lazy(() =>
  import('./pages/flags/IncidentAnalysisPage').then((m) => ({ default: m.IncidentAnalysisPage })),
)
const GradingMainPage = lazy(() =>
  import('./pages/grading/GradingMainPage').then((m) => ({ default: m.GradingMainPage })),
)
const GradingDecisionsPage = lazy(() =>
  import('./pages/grading/GradingDecisionsPage').then((m) => ({ default: m.GradingDecisionsPage })),
)
const BelowSixtyDecisionsPage = lazy(() =>
  import('./pages/grading/BelowSixtyDecisionsPage').then((m) => ({ default: m.BelowSixtyDecisionsPage })),
)
const BelowSixtyPage = lazy(() =>
  import('./pages/grading/BelowSixtyPage').then((m) => ({ default: m.BelowSixtyPage })),
)
const BelowSixtyEmailEditorPage = lazy(() =>
  import('./pages/grading/BelowSixtyEmailEditorPage').then((m) => ({
    default: m.BelowSixtyEmailEditorPage,
  })),
)
const BelowSixtyDecisionEmailEditorPage = lazy(() =>
  import('./pages/grading/BelowSixtyDecisionEmailEditorPage').then((m) => ({
    default: m.BelowSixtyDecisionEmailEditorPage,
  })),
)
const HomeworkTrackingPage = lazy(() =>
  import('./pages/grading/HomeworkTrackingPage').then((m) => ({ default: m.HomeworkTrackingPage })),
)
const ParticipationPage = lazy(() =>
  import('./pages/grading/ParticipationPage').then((m) => ({ default: m.ParticipationPage })),
)
const PlacementIndexPage = lazy(() =>
  import('./pages/grading/PlacementIndexPage').then((m) => ({ default: m.PlacementIndexPage })),
)
const PlacementSectionPage = lazy(() =>
  import('./pages/grading/PlacementSectionPage').then((m) => ({ default: m.PlacementSectionPage })),
)
const PlacementBatchPage = lazy(() =>
  import('./pages/grading/PlacementBatchPage').then((m) => ({ default: m.PlacementBatchPage })),
)
const ScheduleMeetingPage = lazy(() =>
  import('./pages/grading/ScheduleMeetingPage').then((m) => ({ default: m.ScheduleMeetingPage })),
)
const GradingScoreEntryPage = lazy(() =>
  import('./pages/grading/GradingScoreEntryPage').then((m) => ({ default: m.GradingScoreEntryPage })),
)
const InventoryBookIndexPage = lazy(() =>
  import('./pages/inventory/InventoryBookIndexPage').then((m) => ({ default: m.InventoryBookIndexPage })),
)
const InventoryBookFormPage = lazy(() =>
  import('./pages/inventory/InventoryBookFormPage').then((m) => ({ default: m.InventoryBookFormPage })),
)
const InventoryClassroomIndexPage = lazy(() =>
  import('./pages/inventory/InventoryClassroomIndexPage').then((m) => ({
    default: m.InventoryClassroomIndexPage,
  })),
)
const InventoryClassroomFormPage = lazy(() =>
  import('./pages/inventory/InventoryClassroomFormPage').then((m) => ({
    default: m.InventoryClassroomFormPage,
  })),
)
const InventoryClassroomAuditPage = lazy(() =>
  import('./pages/inventory/InventoryClassroomAuditPage').then((m) => ({
    default: m.InventoryClassroomAuditPage,
  })),
)
const InventoryKitchenIndexPage = lazy(() =>
  import('./pages/inventory/InventoryKitchenIndexPage').then((m) => ({
    default: m.InventoryKitchenIndexPage,
  })),
)
const InventoryKitchenFormPage = lazy(() =>
  import('./pages/inventory/InventoryKitchenFormPage').then((m) => ({
    default: m.InventoryKitchenFormPage,
  })),
)
const InventoryOfficeIndexPage = lazy(() =>
  import('./pages/inventory/InventoryOfficeIndexPage').then((m) => ({
    default: m.InventoryOfficeIndexPage,
  })),
)
const InventoryOfficeFormPage = lazy(() =>
  import('./pages/inventory/InventoryOfficeFormPage').then((m) => ({
    default: m.InventoryOfficeFormPage,
  })),
)
const InventoryAdjustPage = lazy(() =>
  import('./pages/inventory/InventoryAdjustPage').then((m) => ({ default: m.InventoryAdjustPage })),
)
const InventoryEditEntryPage = lazy(() =>
  import('./pages/inventory/InventoryEditEntryPage').then((m) => ({ default: m.InventoryEditEntryPage })),
)
const InventorySummaryPage = lazy(() =>
  import('./pages/inventory/InventorySummaryPage').then((m) => ({ default: m.InventorySummaryPage })),
)
const InventoryMovementsIndexPage = lazy(() =>
  import('./pages/inventory/InventoryMovementsIndexPage').then((m) => ({
    default: m.InventoryMovementsIndexPage,
  })),
)
const InventoryMovementFormPage = lazy(() =>
  import('./pages/inventory/InventoryMovementFormPage').then((m) => ({
    default: m.InventoryMovementFormPage,
  })),
)
const TeacherBookDistributePage = lazy(() =>
  import('./pages/inventory/TeacherBookDistributePage').then((m) => ({
    default: m.TeacherBookDistributePage,
  })),
)
const InvoiceManagementPage = lazy(() =>
  import('./pages/invoicePayment/InvoiceManagementPage').then((m) => ({
    default: m.InvoiceManagementPage,
  })),
)
const InvoicePdfTemplatePage = lazy(() =>
  import('./pages/invoicePayment/InvoicePdfTemplatePage').then((m) => ({
    default: m.InvoicePdfTemplatePage,
  })),
)
const SchoolPolicyPage = lazy(() =>
  import('./pages/policy/SchoolPolicyPage').then((m) => ({ default: m.SchoolPolicyPage })),
)
const PicturePolicyPage = lazy(() =>
  import('./pages/policy/PicturePolicyPage').then((m) => ({ default: m.PicturePolicyPage })),
)
const AdminPrintRequestsPage = lazy(() =>
  import('./pages/printRequests/AdminPrintRequestsPage').then((m) => ({
    default: m.AdminPrintRequestsPage,
  })),
)
const TeacherPrintRequestsPage = lazy(() =>
  import('./pages/printRequests/TeacherPrintRequestsPage').then((m) => ({
    default: m.TeacherPrintRequestsPage,
  })),
)
const CertificatesPage = lazy(() =>
  import('./pages/certificates/CertificatesPage').then((m) => ({ default: m.CertificatesPage })),
)
const CertificatesAuditLogPage = lazy(() =>
  import('./pages/certificates/CertificatesAuditLogPage').then((m) => ({
    default: m.CertificatesAuditLogPage,
  })),
)
const StickerFormPage = lazy(() =>
  import('./pages/printables/StickerFormPage').then((m) => ({ default: m.StickerFormPage })),
)
const BadgeFormPage = lazy(() =>
  import('./pages/printables/BadgeFormPage').then((m) => ({ default: m.BadgeFormPage })),
)
const ReportCardManagementPage = lazy(() =>
  import('./pages/printables/ReportCardManagementPage').then((m) => ({
    default: m.ReportCardManagementPage,
  })),
)
const CombinedReportPage = lazy(() =>
  import('./pages/report/CombinedReportPage').then((m) => ({ default: m.CombinedReportPage })),
)
const ReimbursementsIndexPage = lazy(() =>
  import('./pages/reimbursements/ReimbursementsIndexPage').then((m) => ({
    default: m.ReimbursementsIndexPage,
  })),
)
const ReimbursementCreatePage = lazy(() =>
  import('./pages/reimbursements/ReimbursementCreatePage').then((m) => ({
    default: m.ReimbursementCreatePage,
  })),
)
const ReimbursementEditPage = lazy(() =>
  import('./pages/reimbursements/ReimbursementEditPage').then((m) => ({
    default: m.ReimbursementEditPage,
  })),
)
const ReimbursementsUnderProcessingPage = lazy(() =>
  import('./pages/reimbursements/ReimbursementsUnderProcessingPage').then((m) => ({
    default: m.ReimbursementsUnderProcessingPage,
  })),
)
const RefundsListPage = lazy(() =>
  import('./pages/refunds/RefundsListPage').then((m) => ({ default: m.RefundsListPage })),
)
const BadgeScanLogsPage = lazy(() =>
  import('./pages/rfid/BadgeScanLogsPage').then((m) => ({ default: m.BadgeScanLogsPage })),
)
const StaffIndexPage = lazy(() =>
  import('./pages/staff/StaffIndexPage').then((m) => ({ default: m.StaffIndexPage })),
)
const StaffCreatePage = lazy(() =>
  import('./pages/staff/StaffCreatePage').then((m) => ({ default: m.StaffCreatePage })),
)
const StaffEditPage = lazy(() =>
  import('./pages/staff/StaffEditPage').then((m) => ({ default: m.StaffEditPage })),
)
const WhatsappHubPage = lazy(() =>
  import('./pages/whatsapp/WhatsappHubPage').then((m) => ({ default: m.WhatsappHubPage })),
)
const WhatsappManageLinksPage = lazy(() =>
  import('./pages/whatsapp/WhatsappManageLinksPage').then((m) => ({
    default: m.WhatsappManageLinksPage,
  })),
)
const WhatsappParentContactsPage = lazy(() =>
  import('./pages/whatsapp/WhatsappParentContactsPage').then((m) => ({
    default: m.WhatsappParentContactsPage,
  })),
)
const WhatsappParentContactsByClassPage = lazy(() =>
  import('./pages/whatsapp/WhatsappParentContactsByClassPage').then((m) => ({
    default: m.WhatsappParentContactsByClassPage,
  })),
)
const PublicWinnersCompetitionsIndexPage = lazy(() =>
  import('./pages/winners/PublicWinnersPages').then((m) => ({
    default: m.PublicWinnersCompetitionsIndexPage,
  })),
)
const PublicWinnersCompetitionShowPage = lazy(() =>
  import('./pages/winners/PublicWinnersPages').then((m) => ({
    default: m.PublicWinnersCompetitionShowPage,
  })),
)
const RoleListPage = lazy(() =>
  import('./pages/rolePermission/RoleListPage').then((m) => ({ default: m.RoleListPage })),
)
const PermissionsListPage = lazy(() =>
  import('./pages/rolePermission/PermissionsListPage').then((m) => ({
    default: m.PermissionsListPage,
  })),
)
const AddRolePage = lazy(() =>
  import('./pages/rolePermission/AddRolePage').then((m) => ({ default: m.AddRolePage })),
)
const EditRolePage = lazy(() =>
  import('./pages/rolePermission/EditRolePage').then((m) => ({ default: m.EditRolePage })),
)
const AddPermissionPage = lazy(() =>
  import('./pages/rolePermission/AddPermissionPage').then((m) => ({
    default: m.AddPermissionPage,
  })),
)
const EditPermissionPage = lazy(() =>
  import('./pages/rolePermission/EditPermissionPage').then((m) => ({
    default: m.EditPermissionPage,
  })),
)
const AssignRolePage = lazy(() =>
  import('./pages/rolePermission/AssignRolePage').then((m) => ({ default: m.AssignRolePage })),
)
const EditRolePermissionsPage = lazy(() =>
  import('./pages/rolePermission/EditRolePermissionsPage').then((m) => ({
    default: m.EditRolePermissionsPage,
  })),
)
const ScorePredictionPage = lazy(() =>
  import('./pages/scoreAnalysis/ScorePredictionPage').then((m) => ({
    default: m.ScorePredictionPage,
  })),
)
const TrophyProjectionPage = lazy(() =>
  import('./pages/trophy/TrophyPages').then((m) => ({
    default: m.TrophyProjectionPage,
  })),
)
const TrophyWinnersPage = lazy(() =>
  import('./pages/trophy/TrophyPages').then((m) => ({
    default: m.TrophyWinnersPage,
  })),
)
const TrophyFinalPage = lazy(() =>
  import('./pages/trophy/TrophyPages').then((m) => ({
    default: m.TrophyFinalPage,
  })),
)
const SlipPreviewListPage = lazy(() =>
  import('./pages/slips/SlipPreviewListPage').then((m) => ({ default: m.SlipPreviewListPage })),
)
const LateSlipPrintPage = lazy(() =>
  import('./pages/slips/LateSlipPrintPage').then((m) => ({ default: m.LateSlipPrintPage })),
)
const NotificationsActivePage = lazy(() =>
  import('./pages/notifications/NotificationsActivePage').then((m) => ({
    default: m.NotificationsActivePage,
  })),
)
const NotificationsDeletedPage = lazy(() =>
  import('./pages/notifications/NotificationsDeletedPage').then((m) => ({
    default: m.NotificationsDeletedPage,
  })),
)
const ManualPayPage = lazy(() =>
  import('./pages/payment/ManualPayPage').then((m) => ({ default: m.ManualPayPage })),
)
const PaymentNotificationManagementPage = lazy(() =>
  import('./pages/payment/PaymentNotificationManagementPage').then((m) => ({
    default: m.PaymentNotificationManagementPage,
  })),
)
const UnpaidParentsPage = lazy(() =>
  import('./pages/payment/UnpaidParentsPage').then((m) => ({ default: m.UnpaidParentsPage })),
)
const PaymentDiscountStudentPage = lazy(() =>
  import('./pages/payment/PaymentDiscountStudentPage').then((m) => ({
    default: m.PaymentDiscountStudentPage,
  })),
)
const ExtraChargesPage = lazy(() =>
  import('./pages/payment/ExtraChargesPage').then((m) => ({ default: m.ExtraChargesPage })),
)
const FinancialReportPage = lazy(() =>
  import('./pages/payment/FinancialReportPage').then((m) => ({ default: m.FinancialReportPage })),
)
const FinancialReportSummaryPage = lazy(() =>
  import('./pages/payment/FinancialReportSummaryPage').then((m) => ({
    default: m.FinancialReportSummaryPage,
  })),
)
const PaymentRedirectPage = lazy(() =>
  import('./pages/payment/PaymentRedirectPage').then((m) => ({ default: m.PaymentRedirectPage })),
)
const FamilyManagementPage = lazy(() =>
  import('./pages/family/FamilyManagementPage').then((m) => ({ default: m.FamilyManagementPage })),
)
const FamilyComposeEmailPage = lazy(() =>
  import('./pages/family/FamilyComposeEmailPage').then((m) => ({
    default: m.FamilyComposeEmailPage,
  })),
)
const FamilyLegacyImportPage = lazy(() =>
  import('./pages/family/FamilyLegacyImportPage').then((m) => ({ default: m.FamilyLegacyImportPage })),
)
const EmailTemplatesIndexPage = lazy(() =>
  import('./pages/emails').then((m) => ({ default: m.EmailTemplatesIndexPage })),
)
const EmailTemplatePreviewPage = lazy(() =>
  import('./pages/emails').then((m) => ({ default: m.EmailTemplatePreviewPage })),
)
const ParentEmailExtractorPage = lazy(() =>
  import('./pages/emails').then((m) => ({ default: m.ParentEmailExtractorPage })),
)
const ParentHomePage = lazy(() =>
  import('./pages/parent/ParentHomePage').then((m) => ({ default: m.ParentHomePage })),
)
const PortalStylePage = lazy(() =>
  import('./pages/portal/PortalStylePage').then((m) => ({ default: m.PortalStylePage })),
)
const TeacherDashboardPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherDashboardPage })),
)
const TeacherNoClassesPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherNoClassesPage })),
)
const TeacherSelectSemesterPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherSelectSemesterPage })),
)
const TeacherTrashPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherTrashPage })),
)
const TeacherInboxPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherInboxPage })),
)
const TeacherSentPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherSentPage })),
)
const TeacherMessagePage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherMessagePage })),
)
const TeacherCompetitionScoresIndexPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherCompetitionScoresIndexPage,
  })),
)
const TeacherCompetitionScoresDetailPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherCompetitionScoresDetailPage,
  })),
)
const TeacherAbsenceVacationPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAbsenceVacationPage })),
)
const TeacherAddFinalExamPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddFinalExamPage })),
)
const TeacherAddHomeworkPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddHomeworkPage })),
)
const TeacherAddMidtermExamPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddMidtermExamPage })),
)
const TeacherAddParticipationPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddParticipationPage })),
)
const TeacherAddProjectPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddProjectPage })),
)
const TeacherAddQuizPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddQuizPage })),
)
const TeacherAddQuizColumnFormPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAddQuizColumnFormPage })),
)
const TeacherCalendarPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherCalendarPage })),
)
const TeacherClassProgressHistoryPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherClassProgressHistoryPage,
  })),
)
const TeacherClassProgressSubmitPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherClassProgressSubmitPage,
  })),
)
const TeacherClassProgressViewPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherClassProgressViewPage,
  })),
)
const TeacherClassViewPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherClassViewPage })),
)
const TeacherDraftsPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherDraftsPage })),
)
const TeacherExamDraftsPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherExamDraftsPage })),
)
const TeacherHomeworkListPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherHomeworkListPage })),
)
const TeacherScoresPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherScoresPage })),
)
const TeacherShowupdateAttendancePage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({
    default: m.TeacherShowupdateAttendancePage,
  })),
)
const TeacherAssignmentPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherAssignmentPage })),
)
const TeacherContactUsPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherContactUsPage })),
)
const TeacherSupportPage = lazy(() =>
  import('./pages/teacher/TeacherParityPages').then((m) => ({ default: m.TeacherSupportPage })),
)
const ParentAttendancePage = lazy(() =>
  import('./pages/parent/ParentAttendancePage').then((m) => ({ default: m.ParentAttendancePage })),
)
const ParentEmergencyContactsPage = lazy(() =>
  import('./pages/parent/ParentEmergencyContactsPage').then((m) => ({
    default: m.ParentEmergencyContactsPage,
  })),
)
const ParentAttendanceReportsHistoryPage = lazy(() =>
  import('./pages/parent/ParentAccountListPages').then((m) => ({
    default: m.ParentAttendanceReportsHistoryPage,
  })),
)
const ParentAuthorizedUsersPage = lazy(() =>
  import('./pages/parent/ParentAccountListPages').then((m) => ({
    default: m.ParentAuthorizedUsersPage,
  })),
)
const RedirectParentLegacyStudentEdit = lazy(() =>
  import('./pages/parent/ParentCiRouteRedirects').then((m) => ({
    default: m.RedirectParentLegacyStudentEdit,
  })),
)
const RedirectParentLegacyEmergencyContactEdit = lazy(() =>
  import('./pages/parent/ParentCiRouteRedirects').then((m) => ({
    default: m.RedirectParentLegacyEmergencyContactEdit,
  })),
)
const ParentReportCardsSignPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentReportCardsSignPage,
  })),
)
const ParentReportCardsViewPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentReportCardsViewPage,
  })),
)
const ParentProgressViewPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentProgressViewPage,
  })),
)
const ParentProgressAttachmentPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentProgressAttachmentPage,
  })),
)
const ParentProgressAttachmentFilePage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentProgressAttachmentFilePage,
  })),
)
const ParentEmergencyContactEditPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({
    default: m.ParentEmergencyContactEditPage,
  })),
)
const ParentStudentEditPage = lazy(() =>
  import('./pages/parent/dynamicParityPages').then((m) => ({ default: m.ParentStudentEditPage })),
)
const ParentEditAllStudentsPage = lazy(() =>
  import('./pages/parent/extraParentParityPages').then((m) => ({
    default: m.ParentEditAllStudentsPage,
  })),
)
const ParentAddEmergencyFormPage = lazy(() =>
  import('./pages/parent/extraParentParityPages').then((m) => ({
    default: m.ParentAddEmergencyFormPage,
  })),
)
const ParentAddStudentFormPage = lazy(() =>
  import('./pages/parent/extraParentParityPages').then((m) => ({
    default: m.ParentAddStudentFormPage,
  })),
)
const ParentUpdateProfileParityPage = lazy(() =>
  import('./pages/parent/extraParentParityPages').then((m) => ({
    default: m.ParentUpdateProfileParityPage,
  })),
)
const ParentAddSecondParentPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentAddSecondParentPage })),
)
const ParentAssignmentsPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentAssignmentsPage })),
)
const ParentCalendarPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentCalendarPage })),
)
const ParentClassesPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentClassesPage })),
)
const ParentEnrollFailurePage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentEnrollFailurePage })),
)
const ParentEnrollSuccessPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentEnrollSuccessPage })),
)
const ParentInvoicePaymentPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentInvoicePaymentPage })),
)
const ParentMessagePage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentMessagePage })),
)
const ParentNoKidsRegisteredPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({
    default: m.ParentNoKidsRegisteredPage,
  })),
)
const ParentPaymentSuccessPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentPaymentSuccessPage })),
)
const ParentProgressListPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentProgressListPage })),
)
const ParentReportCardsPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentReportCardsPage })),
)
const ParentScoresPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentScoresPage })),
)
const StudentScoreCardListPage = lazy(() =>
  import('./pages/student/StudentScoreCardListPage').then((m) => ({
    default: m.StudentScoreCardListPage,
  })),
)
const StudentScoreCardPage = lazy(() =>
  import('./pages/student/StudentScoreCardPage').then((m) => ({ default: m.StudentScoreCardPage })),
)
const ParentSuccessMessagePage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentSuccessMessagePage })),
)
const ParentWithdrawSuccessPage = lazy(() =>
  import('./pages/parent/staticParityPages').then((m) => ({ default: m.ParentWithdrawSuccessPage })),
)
const ParentContactPage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({ default: m.ParentContactPage })),
)
const ParentEnrollClassesPage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({
    default: m.ParentEnrollClassesPage,
  })),
)
const ParentEventsPage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({ default: m.ParentEventsPage })),
)
const ParentPaymentInvoicesPage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({
    default: m.ParentPaymentInvoicesPage,
  })),
)
const ParentRegisterStudentPage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({
    default: m.ParentRegisterStudentPage,
  })),
)
const ParentReportAttendancePage = lazy(() =>
  import('./pages/parent/WiredParentScreens').then((m) => ({
    default: m.ParentReportAttendancePage,
  })),
)

function RouteFallback() {
  return <div className="container py-4">Loading…</div>
}

export default function App() {
  return (
    <AuthProvider>
      <BrowserRouter>
        <GlobalTableSorting />
        <Suspense fallback={<RouteFallback />}>
          <Routes>
            <Route element={<PublicLayout />}>
              <Route path="/" element={<HomePage />} />
              <Route path="/login" element={<LoginPage />} />
              <Route path="/register" element={<RegisterPage />} />
              <Route path="/forgot-password" element={<ForgotPasswordPage />} />
              <Route path="/reset-password" element={<ResetPasswordPage />} />
              <Route path="/confirm-email-change" element={<ConfirmEmailChangePage />} />
              <Route path="/set-password" element={<SetPasswordPage />} />
              <Route
                path="/set-authorized-user-password/:userId"
                element={<SetAuthorizedUserPasswordPage />}
              />
              <Route path="/password-set-success" element={<PasswordSetSuccessPage />} />
              <Route path="/user/login" element={<LoginPage />} />
              <Route path="/user/register" element={<RegisterPage />} />
              <Route path="/user/forgot-password" element={<ForgotPasswordPage />} />
              <Route path="/user/reset-password" element={<ResetPasswordPage />} />
              <Route path="/user/confirm-email-change" element={<ConfirmEmailChangePage />} />
              <Route path="/user/set-password" element={<SetPasswordPage />} />
              <Route
                path="/user/set-authorized-user-password/:userId"
                element={<SetAuthorizedUserPasswordPage />}
              />
              <Route path="/user/password-set-success" element={<PasswordSetSuccessPage />} />
              <Route path="/invalid-token" element={<InvalidTokenPage />} />
              <Route path="/access-denied" element={<AccessDeniedPage />} />
              <Route path="/school-policy" element={<SchoolPolicyPage />} />
              <Route path="/picture-policy" element={<PicturePolicyPage />} />
            </Route>

            <Route path="/admin" element={<AdminDocs />} />

            <Route element={<RequireAuth />}>
              <Route
                path="/docs"
                element={
                  <div className="docs-root-inner py-3">
                    <SwaggerDocs bootstrapPath="/api/docs/public" />
                  </div>
                }
              />
              <Route path="/app">
                <Route element={<ManagementLayout />}>
                  <Route index element={<Navigate to="home" replace />} />
                  <Route path="select-role" element={<RoleSelectPage />} />
                  <Route path="home" element={<AppHome />} />
                  <Route path="landing-page/admin-dashboard" element={<AdminLandingDashboardPage />} />
                  <Route path="admin/dashboard" element={<AppHome />} />
                  <Route path="administrator/dashboard" element={<AppHome />} />
                  <Route path="administrator/administratordashboard" element={<AppHome />} />
                  <Route path="administrator/broadcast_email" element={<AdminBroadcastEmailPage />} />
                  <Route path="administrator/calendar" element={<AdminCalendarPage />} />
                  <Route path="administrator/events" element={<AdminCalendarViewPage />} />
                  <Route path="administrator/calendar_view" element={<AdminCalendarViewPage />} />
                  <Route path="administrator/calendar_add_event" element={<AdminCalendarAddEventPage />} />
                  <Route path="administrator/calendar_edit/:eventId" element={<AdminCalendarEditPage />} />
                  <Route path="administrator/class_assignment" element={<AdminClassAssignmentPage />} />
                  <Route path="administrator/class_section" element={<AdminClassSectionPage />} />
                  <Route path="administrator/class_warning_modal" element={<AdminClassWarningModalPage />} />
                  <Route path="administrator/course_materials" element={<AdminCourseMaterialsPage />} />
                  <Route path="administrator/daily_attendance" element={<AdminDailyAttendancePage />} />
                  <Route path="administrator/daily_attendance_analysis" element={<AdminDailyAttendanceAnalysisPage />} />
                  <Route path="administrator/exam_drafts" element={<AdminExamDraftsPage />} />
                  <Route path="administrator/exam-drafts" element={<AdminExamDraftsPage />} />
                  <Route path="administrator/grading_management" element={<AdminGradingManagementPage />} />
                  <Route path="administrator/ip_bans" element={<AdminIpBansPage />} />
                  <Route path="administrator/late_slip_logs" element={<AdminLateSlipLogsPage />} />
                  <Route path="administrator/manage_users" element={<AdminManageUsersPage />} />
                  <Route path="administrator/notifications_alerts" element={<AdminNotificationsAlertsPage />} />
                  <Route path="administrator/parent_profile" element={<AdminParentProfilePage />} />
                  <Route path="administrator/parent_profiles" element={<AdminParentProfilePage />} />
                  <Route path="administrator/paypal_transactions" element={<AdminPaypalTransactionsPage />} />
                  <Route path="administrator/print_notification_admins" element={<AdminPrintNotificationAdminsPage />} />
                  <Route path="administrator/removed_students" element={<AdminRemovedStudentsPage />} />
                  <Route path="administrator/search_results" element={<AdminSearchResultsPage />} />
                  <Route path="administrator/sections_auto_distribute" element={<AdminSectionsAutoDistributePage />} />
                  <Route path="administrator/sections/auto-distribute" element={<AdminSectionsAutoDistributePage />} />
                  <Route path="administrator/sections_promotion_totals" element={<AdminSectionsPromotionTotalsPage />} />
                  <Route path="administrator/sections/promotion-totals" element={<AdminSectionsPromotionTotalsPage />} />
                  <Route path="administrator/student_class_assignment" element={<AdminStudentClassAssignmentPage />} />
                  <Route path="administrator/student_profiles" element={<AdminStudentProfilesPage />} />
                  <Route path="administrator/subject_curriculum" element={<AdminSubjectCurriculumPage />} />
                  <Route path="administrator/subject-curriculum" element={<AdminSubjectCurriculumPage />} />
                  <Route path="administrator/teacher_class_assignment" element={<AdminTeacherClassAssignmentPage />} />
                  <Route path="administrator/teacher_submissions" element={<AdminTeacherSubmissionsPage />} />
                  <Route path="administrator/teacher-submissions" element={<AdminTeacherSubmissionsPage />} />
                  <Route path="admin/competition-winners" element={<CompetitionWinnersIndexPage />} />
                  <Route path="admin/competition-winners/create" element={<CompetitionWinnerFormPage />} />
                  <Route path="admin/competition-winners/:id/settings" element={<CompetitionWinnerFormPage />} />
                  <Route path="admin/competition-winners/:id" element={<CompetitionWinnerScoresPage />} />
                  <Route path="admin/competition-winners/:id/preview" element={<CompetitionWinnerPreviewPage />} />
                  <Route path="admin/competition-winners/:id/winners" element={<CompetitionWinnerWinnersPage />} />
                  <Route path="competition-winners" element={<CompetitionWinnersIndexPage />} />
                  <Route path="competition-winners/create" element={<CompetitionWinnerFormPage />} />
                  <Route path="competition-winners/:id/settings" element={<CompetitionWinnerFormPage />} />
                  <Route path="competition-winners/:id/preview" element={<CompetitionWinnerPreviewPage />} />
                  <Route path="competition-winners/:id/winners" element={<CompetitionWinnerWinnersPage />} />
                  <Route path="competition-winners/:id" element={<CompetitionWinnerScoresPage />} />
                  <Route path="admin/progress" element={<AdminClassProgressListPage />} />
                  <Route path="admin/progress/view/:id" element={<AdminClassProgressViewPage />} />
                  <Route path="admin/charges" element={<ExtraChargesPage />} />
                  <Route path="admin/print-requests" element={<AdminPrintRequestsPage />} />
                  <Route path="admin/enrollment/new-students" element={<RegisteredStudentsPage />} />
                  <Route path="administrator/student-score-card" element={<AdminStudentScoreCardPage />} />
                  <Route path="administrator/emergency-contacts" element={<AdminEmergencyContactIndexPage />} />
                  <Route path="administrator/emergency-contacts/:contactId/edit" element={<AdminEmergencyContactEditPage />} />
                  <Route path="administrator/absence" element={<AdministratorAbsencePage />} />
                  <Route path="administrator/attendance/admins-form" element={<AdminsAttendanceFormPage />} />
                  <Route path="administrator/attendance/tracking" element={<AttendanceTrackingPage />} />
                  <Route path="administrator/attendance/management" element={<AttendanceManagementPage />} />
                  <Route path="administrator/attendance/badge-scans" element={<BadgeScanningListPage />} />
                  <Route path="attendance/management" element={<AttendanceManagementPage />} />
                  <Route path="administrator/attendance/compose-email" element={<ComposeAttendanceEmailPage />} />
                  <Route path="administrator/attendance/early-dismissals" element={<EarlyDismissalsPage />} />
                  <Route path="administrator/attendance/early-dismissals/new" element={<EarlyDismissalsAddPage />} />
                  <Route path="attendance/early-dismissals/new" element={<EarlyDismissalsAddPage />} />
                  <Route path="attendance/early-dismissals" element={<EarlyDismissalsPage />} />
                  <Route path="administrator/attendance/parent-reports" element={<ParentAttendanceReportsAdminPage />} />
                  <Route path="administrator/attendance/teacher-form" element={<TeacherAttendanceFormPage />} />
                  <Route path="administrator/attendance/teacher-month" element={<TeacherAttendanceMonthPage />} />
                  <Route path="admin/teacher-attendance/month" element={<TeacherAttendanceMonthPage />} />
                  <Route path="administrator/attendance/view/:studentId" element={<AttendanceStudentViolationsViewPage />} />
                  <Route path="administrator/attendance/violations/pending" element={<ViolationsPendingPage />} />
                  <Route path="administrator/attendance/violations/notified" element={<ViolationsNotifiedPage />} />
                  <Route path="attendance/violations/pending" element={<ViolationsPendingPage />} />
                  <Route path="attendance/violations/notified" element={<ViolationsNotifiedPage />} />
                  <Route path="attendance/violations" element={<AttendanceViolationsHubPage />} />
                  <Route path="administrator/attendance-templates" element={<AttendanceTemplatesIndexPage />} />
                  <Route path="administrator/class-prep" element={<ClassPrepListPage />} />
                  <Route
                    path="administrator/class-prep/print/:sectionId/:schoolYear"
                    element={<ClassPrepPrintPage />}
                  />
                  <Route path="administrator/communications" element={<CommunicationsIndexPage />} />
                  <Route path="administrator/configuration_view" element={<ConfigurationViewPage />} />
                  <Route path="administrator/configuration" element={<Navigate to="configuration_view" replace />} />
                  <Route path="administrator/school-years" element={<SchoolYearsManagementPage />} />
                  <Route path="administrator/discounts" element={<DiscountListPage />} />
                  <Route path="administrator/discounts/create" element={<DiscountCreatePage />} />
                  <Route path="administrator/discounts/apply" element={<DiscountApplyVoucherPage />} />
                  <Route path="administrator/discounts/reverse" element={<ReverseDiscountPage />} />
                  <Route path="administrator/expenses" element={<ExpensesIndexPage />} />
                  <Route path="administrator/expenses/create" element={<ExpenseCreatePage />} />
                  <Route path="administrator/expenses/:expenseId/edit" element={<ExpenseEditPage />} />
                  <Route path="administrator/flags/management" element={<FlagsManagementPage />} />
                  <Route path="administrator/flags/processed" element={<ProcessedFlagsPage />} />
                  <Route
                    path="administrator/flags/incident-analysis"
                    element={<IncidentAnalysisPage />}
                  />
                  <Route path="administrator/grading/main" element={<GradingMainPage />} />
                  <Route path="administrator/grading/decisions" element={<GradingDecisionsPage />} />
                  <Route path="administrator/grading/all-decisions" element={<GradingDecisionsPage />} />
                  <Route path="administrator/grading/below-sixty-decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route path="administrator/grading/below-60/decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route path="administrator/grading/below-sixty/decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route
                    path="administrator/grading/below-60/decisions/email-editor"
                    element={<BelowSixtyDecisionEmailEditorPage />}
                  />
                  <Route
                    path="administrator/grading/below-sixty/decisions/email-editor"
                    element={<BelowSixtyDecisionEmailEditorPage />}
                  />
                  <Route path="administrator/grading/below-60" element={<BelowSixtyPage />} />
                  <Route
                    path="administrator/grading/below-60/email-editor"
                    element={<BelowSixtyEmailEditorPage />}
                  />
                  <Route path="administrator/grading/below-sixty" element={<BelowSixtyPage />} />
                  <Route
                    path="administrator/grading/below-sixty/email-editor"
                    element={<BelowSixtyEmailEditorPage />}
                  />
                  <Route path="administrator/grading/homework-tracking" element={<HomeworkTrackingPage />} />
                  <Route path="administrator/grading/participation" element={<ParticipationPage />} />
                  <Route path="administrator/grading/placement-index" element={<PlacementIndexPage />} />
                  <Route path="administrator/grading/placement" element={<PlacementSectionPage />} />
                  <Route path="administrator/grading/placement-batch/:batchId" element={<PlacementBatchPage />} />
                  <Route path="administrator/grading/schedule-meeting" element={<ScheduleMeetingPage />} />
                  <Route path="administrator/grading/scores/:scoreType/:classSectionId" element={<GradingScoreEntryPage />} />
                  <Route path="administrator/grading/scores/:scoreType/:classSectionId/:studentId" element={<GradingScoreEntryPage />} />
                  <Route path="grading/below-60/email-editor" element={<BelowSixtyEmailEditorPage />} />
                  <Route path="grading/decisions" element={<GradingDecisionsPage />} />
                  <Route path="grading/all-decisions" element={<GradingDecisionsPage />} />
                  <Route path="grading/below-sixty-decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route path="grading/below-60/decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route path="grading/below-sixty/decisions" element={<BelowSixtyDecisionsPage />} />
                  <Route
                    path="grading/below-60/decisions/email-editor"
                    element={<BelowSixtyDecisionEmailEditorPage />}
                  />
                  <Route
                    path="grading/below-sixty/decisions/email-editor"
                    element={<BelowSixtyDecisionEmailEditorPage />}
                  />
                  <Route path="grading/below-60" element={<BelowSixtyPage />} />
                  <Route path="grading/below-sixty/email-editor" element={<BelowSixtyEmailEditorPage />} />
                  <Route path="grading/below-sixty" element={<BelowSixtyPage />} />
                  <Route path="grading/homework-tracking" element={<HomeworkTrackingPage />} />
                  <Route path="grading/participation" element={<ParticipationPage />} />
                  <Route path="grading/placement-index" element={<PlacementIndexPage />} />
                  <Route path="grading/placement-batch/:batchId" element={<PlacementBatchPage />} />
                  <Route path="grading/placement" element={<PlacementSectionPage />} />
                  <Route path="grading/schedule-meeting" element={<ScheduleMeetingPage />} />
                  <Route path="grading/scores/:scoreType/:classSectionId" element={<GradingScoreEntryPage />} />
                  <Route path="grading/scores/:scoreType/:classSectionId/:studentId" element={<GradingScoreEntryPage />} />
                  <Route path="grading/main" element={<GradingMainPage />} />
                  <Route path="grading" element={<GradingMainPage />} />
                  <Route path="administrator/inventory/book" element={<InventoryBookIndexPage />} />
                  <Route path="administrator/inventory/book/create" element={<InventoryBookFormPage />} />
                  <Route path="administrator/inventory/book/:itemId/edit" element={<InventoryBookFormPage />} />
                  <Route path="inventory/book" element={<InventoryBookIndexPage />} />
                  <Route path="inventory/book/create" element={<InventoryBookFormPage />} />
                  <Route path="inventory/book/:itemId/edit" element={<InventoryBookFormPage />} />
                  <Route path="administrator/inventory/classroom" element={<InventoryClassroomIndexPage />} />
                  <Route path="administrator/inventory/classroom/create" element={<InventoryClassroomFormPage />} />
                  <Route
                    path="administrator/inventory/classroom/:itemId/edit"
                    element={<InventoryClassroomFormPage />}
                  />
                  <Route
                    path="administrator/inventory/classroom/:itemId/audit"
                    element={<InventoryClassroomAuditPage />}
                  />
                  <Route path="administrator/inventory/kitchen" element={<InventoryKitchenIndexPage />} />
                  <Route path="administrator/inventory/kitchen/create" element={<InventoryKitchenFormPage />} />
                  <Route path="administrator/inventory/kitchen/:itemId/edit" element={<InventoryKitchenFormPage />} />
                  <Route path="administrator/inventory/office" element={<InventoryOfficeIndexPage />} />
                  <Route path="administrator/inventory/office/create" element={<InventoryOfficeFormPage />} />
                  <Route path="administrator/inventory/office/:itemId/edit" element={<InventoryOfficeFormPage />} />
                  <Route path="administrator/inventory/items/:itemId/adjust" element={<InventoryAdjustPage />} />
                  <Route path="administrator/inventory/edit/:itemId" element={<InventoryEditEntryPage />} />
                  <Route path="administrator/inventory/summary" element={<InventorySummaryPage />} />
                  <Route path="administrator/inventory/movements" element={<InventoryMovementsIndexPage />} />
                  <Route path="administrator/inventory/movements/create" element={<InventoryMovementFormPage />} />
                  <Route
                    path="administrator/inventory/movements/:movementId/edit"
                    element={<InventoryMovementFormPage />}
                  />
                  <Route path="administrator/family/compose-email" element={<FamilyComposeEmailPage />} />
                  <Route path="administrator/invoice-payment" element={<InvoiceManagementPage />} />
                  <Route
                    path="administrator/invoice-payment/pdf/:invoiceId"
                    element={<InvoicePdfTemplatePage />}
                  />
                  <Route path="administrator/notifications/active" element={<NotificationsActivePage />} />
                  <Route path="notifications/active" element={<NotificationsActivePage />} />
                  <Route path="administrator/notifications/deleted" element={<NotificationsDeletedPage />} />
                  <Route path="notifications/deleted" element={<NotificationsDeletedPage />} />
                  <Route path="administrator/payment/manual-pay" element={<ManualPayPage />} />
                  <Route
                    path="administrator/payment/manual-payment"
                    element={<Navigate to="/app/administrator/payment/manual-pay" replace />}
                  />
                  <Route
                    path="administrator/payment/notification-management"
                    element={<PaymentNotificationManagementPage />}
                  />
                  <Route path="payment/unpaid-parents" element={<UnpaidParentsPage />} />
                  <Route path="administrator/payment/unpaid-parents" element={<UnpaidParentsPage />} />
                  <Route
                    path="administrator/payment/discount-apply-student"
                    element={<PaymentDiscountStudentPage />}
                  />
                  <Route path="administrator/payment/extra-charges" element={<ExtraChargesPage />} />
                  <Route path="administrator/payment/financial-report" element={<FinancialReportPage />} />
                  <Route
                    path="administrator/payment/financial-report-summary"
                    element={<FinancialReportSummaryPage />}
                  />
                  <Route path="administrator/family" element={<FamilyManagementPage />} />
                  <Route path="families/import-legacy" element={<FamilyLegacyImportPage />} />
                  <Route
                    path="administrator/enroll-withdraw/new-students"
                    element={<RegisteredStudentsPage />}
                  />
                  <Route
                    path="administrator/enroll-withdraw/enrollment-withdrawal"
                    element={<EnrollmentWithdrawalPage />}
                  />
                  <Route path="administrator/email-templates" element={<EmailTemplatesIndexPage />} />
                  <Route
                    path="administrator/email-templates/:templateId"
                    element={<EmailTemplatePreviewPage />}
                  />
                  <Route
                    path="administrator/parent-email-extractor"
                    element={<ParentEmailExtractorPage />}
                  />
                  <Route path="administrator/print-requests" element={<AdminPrintRequestsPage />} />
                  <Route path="printables_reports/stickers" element={<StickerFormPage />} />
                  <Route path="administrator/printables/stickers" element={<StickerFormPage />} />
                  <Route path="administrator/printables/badges" element={<BadgeFormPage />} />
                  <Route
                    path="administrator/printables/report-cards"
                    element={<ReportCardManagementPage />}
                  />
                  <Route path="administrator/certificates" element={<CertificatesPage />} />
                  <Route path="administrator/certificates/log" element={<CertificatesAuditLogPage />} />
                  <Route
                    path="administrator/score-analysis/score-prediction"
                    element={<ScorePredictionPage />}
                  />
                  <Route path="administrator/trophy" element={<TrophyProjectionPage />} />
                  <Route path="administrator/trophy/winners" element={<TrophyWinnersPage />} />
                  <Route path="administrator/trophy/final" element={<TrophyFinalPage />} />
                  <Route path="administrator/trophy_winners" element={<TrophyWinnersPage />} />
                  <Route path="administrator/trophy_final" element={<TrophyFinalPage />} />
                  <Route path="administrator/slips/preview" element={<SlipPreviewListPage />} />
                  <Route path="administrator/slips/print" element={<LateSlipPrintPage />} />
                  <Route path="slips/print" element={<LateSlipPrintPage />} />
                  <Route path="slips/preview" element={<SlipPreviewListPage />} />
                  <Route path="report/combined" element={<CombinedReportPage />} />
                  <Route path="administrator/reimbursements" element={<ReimbursementsIndexPage />} />
                  <Route path="administrator/reimbursements/create" element={<ReimbursementCreatePage />} />
                  <Route
                    path="administrator/reimbursements/:reimbursementId/edit"
                    element={<ReimbursementEditPage />}
                  />
                  <Route
                    path="administrator/reimbursements/under-processing"
                    element={<ReimbursementsUnderProcessingPage />}
                  />
                  <Route path="refunds/list" element={<RefundsListPage />} />
                  <Route path="user/welcome-back" element={<WelcomeBackPage />} />
                  <Route path="user/login-activity" element={<LoginActivityPage />} />
                  <Route path="user/user-list" element={<UserListPage />} />
                  <Route path="user/create" element={<UserCreatePage />} />
                  <Route path="user/edit/:userId" element={<UserEditPage />} />
                  <Route path="staff" element={<StaffIndexPage />} />
                  <Route path="staff/create" element={<StaffCreatePage />} />
                  <Route path="staff/edit/:staffId" element={<StaffEditPage />} />
                  <Route path="whatsapp" element={<WhatsappHubPage />} />
                  <Route path="whatsapp/manage-links" element={<WhatsappManageLinksPage />} />
                  <Route path="whatsapp/parent-contacts" element={<WhatsappParentContactsPage />} />
                  <Route
                    path="whatsapp/parent-contacts-by-class"
                    element={<WhatsappParentContactsByClassPage />}
                  />
                  <Route path="winners/competitions" element={<PublicWinnersCompetitionsIndexPage />} />
                  <Route
                    path="winners/competitions/:competitionId"
                    element={<PublicWinnersCompetitionShowPage />}
                  />
                  <Route path="administrator/role-permission/roles" element={<RoleListPage />} />
                  <Route path="administrator/role-permission/roles/create" element={<AddRolePage />} />
                  <Route
                    path="administrator/role-permission/roles/:roleId/edit"
                    element={<EditRolePage />}
                  />
                  <Route
                    path="administrator/role-permission/roles/:roleId/permissions"
                    element={<EditRolePermissionsPage />}
                  />
                  <Route path="administrator/role-permission/permissions" element={<PermissionsListPage />} />
                  <Route
                    path="administrator/role-permission/permissions/create"
                    element={<AddPermissionPage />}
                  />
                  <Route
                    path="administrator/role-permission/permissions/:permissionId/edit"
                    element={<EditPermissionPage />}
                  />
                  <Route path="administrator/role-permission/assign" element={<AssignRolePage />} />
                  <Route path="rolepermission/roles" element={<RoleListPage />} />
                  <Route path="rolepermission/roles/create" element={<AddRolePage />} />
                  <Route path="rolepermission/roles/:roleId/edit" element={<EditRolePage />} />
                  <Route path="rolepermission/roles/:roleId/permissions" element={<EditRolePermissionsPage />} />
                  <Route path="rolepermission/permissions" element={<PermissionsListPage />} />
                  <Route path="rolepermission/list_permissions" element={<PermissionsListPage />} />
                  <Route path="rolepermission/permissions/create" element={<AddPermissionPage />} />
                  <Route path="rolepermission/permissions/:permissionId/edit" element={<EditPermissionPage />} />
                  <Route path="rolepermission/assign" element={<AssignRolePage />} />
                  <Route path="rfid_coming_soon" element={<BadgeScanLogsPage />} />
                  <Route path="nav-builder" element={<NavBuilderPage />} />
                  <Route path="nav-builder/index" element={<NavBuilderPage />} />
                  <Route path="nav-builder/edit" element={<NavBuilderPage />} />
                </Route>

                <Route element={<MainLayout />}>
                <Route path="account" element={<UserEditPage />} />
                <Route path="portal-style" element={<PortalStylePage />} />
                <Route path="teacher_dashboard" element={<TeacherDashboardPage />} />
                <Route path="student/score-card/list" element={<StudentScoreCardListPage />} />
                <Route
                  path="student/score-card"
                  element={<Navigate to="/app/student/score-card/list" replace />}
                />
                <Route path="student/score-card/:studentId" element={<StudentScoreCardPage />} />
                <Route
                  path="teacher/dashboard"
                  element={<Navigate to="/app/teacher_dashboard" replace />}
                />
                <Route path="teacher/no-classes" element={<TeacherNoClassesPage />} />
                <Route path="teacher/select-semester" element={<TeacherSelectSemesterPage />} />
                <Route path="teacher/trash" element={<TeacherTrashPage />} />
                <Route path="teacher/inbox" element={<TeacherInboxPage />} />
                <Route path="teacher/sent" element={<TeacherSentPage />} />
                <Route path="teacher/messages/:messageId" element={<TeacherMessagePage />} />
                <Route path="teacher/competition-scores" element={<TeacherCompetitionScoresIndexPage />} />
                <Route
                  path="teacher/competition-scores/:competitionId"
                  element={<TeacherCompetitionScoresDetailPage />}
                />
                <Route path="teacher/inventory/book-distribute" element={<TeacherBookDistributePage />} />
                <Route path="teacher/print-requests" element={<TeacherPrintRequestsPage />} />
                <Route path="teacher/absence-vacation" element={<TeacherAbsenceVacationPage />} />
                <Route path="teacher/add-final-exam" element={<TeacherAddFinalExamPage />} />
                <Route path="teacher/add-homework" element={<TeacherAddHomeworkPage />} />
                <Route path="teacher/add-midterm-exam" element={<TeacherAddMidtermExamPage />} />
                <Route path="teacher/add-participation" element={<TeacherAddParticipationPage />} />
                <Route path="teacher/add-project" element={<TeacherAddProjectPage />} />
                <Route path="teacher/add-quiz" element={<TeacherAddQuizPage />} />
                <Route path="teacher/add-quiz-column-form" element={<TeacherAddQuizColumnFormPage />} />
                <Route path="teacher/calendar" element={<TeacherCalendarPage />} />
                <Route path="teacher/class-progress-history" element={<TeacherClassProgressHistoryPage />} />
                <Route path="teacher/class-progress-submit" element={<TeacherClassProgressSubmitPage />} />
                <Route path="teacher/class-progress-view" element={<TeacherClassProgressViewPage />} />
                <Route path="teacher/class-view" element={<TeacherClassViewPage />} />
                <Route path="teacher/drafts" element={<TeacherDraftsPage />} />
                <Route path="teacher/exam-drafts" element={<TeacherExamDraftsPage />} />
                <Route path="teacher/homework-list" element={<TeacherHomeworkListPage />} />
                <Route path="teacher/scores" element={<TeacherScoresPage />} />
                <Route path="teacher/showupdate-attendance" element={<TeacherShowupdateAttendancePage />} />
                <Route path="teacher/teacher-assignment" element={<TeacherAssignmentPage />} />
                <Route path="teacher/teacher-contactus" element={<TeacherContactUsPage />} />
                <Route path="teacher/teacher-support" element={<TeacherSupportPage />} />
                <Route
                  path="teacher/competition-scores/index"
                  element={<Navigate to="/app/teacher/competition-scores" replace />}
                />

                <Route path="parent/add_second_parent" element={<Navigate to="/app/parent/add-second-parent" replace />} />
                <Route path="parent/register_student" element={<Navigate to="/app/parent/register-student" replace />} />
                <Route path="parent/enroll_classes" element={<Navigate to="/app/parent/enroll-classes" replace />} />
                <Route path="parent/enroll_success" element={<Navigate to="/app/parent/enroll/success" replace />} />
                <Route path="parent/enroll_failure" element={<Navigate to="/app/parent/enroll/failure" replace />} />
                <Route path="parent/invoice_payment" element={<Navigate to="/app/parent/invoice-payment" replace />} />
                <Route path="parent/viewSecondParent" element={<Navigate to="/app/parent/add-second-parent" replace />} />
                <Route path="parent/child_register" element={<Navigate to="/app/parent/register-student" replace />} />

                <Route path="parent/edit_student/:studentId" element={<RedirectParentLegacyStudentEdit />} />
                <Route path="parent/edit-student/:studentId" element={<RedirectParentLegacyStudentEdit />} />

                <Route path="parent_dashboard" element={<Navigate to="/app/parent/home" replace />} />

                <Route path="parent/report-cards/sign/:studentId" element={<ParentReportCardsSignPage />} />

                <Route
                  path="parent/edit-emergency-contact/:contactId"
                  element={<RedirectParentLegacyEmergencyContactEdit />}
                />
                <Route
                  path="parent/edit_emergency_contact/:contactId"
                  element={<RedirectParentLegacyEmergencyContactEdit />}
                />

                <Route path="parent/enroll/failure" element={<ParentEnrollFailurePage />} />
                <Route path="parent/enroll/success" element={<ParentEnrollSuccessPage />} />
                <Route path="parent/payment/success" element={<ParentPaymentSuccessPage />} />
                <Route path="parent/payment-redirect" element={<PaymentRedirectPage />} />
                <Route path="parent/withdraw/success" element={<ParentWithdrawSuccessPage />} />

                <Route path="parent/report-cards/view/:reportId" element={<ParentReportCardsViewPage />} />
                <Route path="parent/progress/view/:progressId" element={<ParentProgressViewPage />} />
                <Route path="parent/progress/attachment/:attachmentId" element={<ParentProgressAttachmentPage />} />
                <Route path="parent/progress/attachment-file/:fileId" element={<ParentProgressAttachmentFilePage />} />

                <Route path="parent/emergency-contacts" element={<ParentEmergencyContactsPage />} />
                <Route path="parent/edit-emergency-contact" element={<ParentEmergencyContactsPage />} />

                <Route
                  path="parent/emergency-contact/:contactId"
                  element={<ParentEmergencyContactEditPage />}
                />
                <Route path="parent/students/:studentId/edit" element={<ParentStudentEditPage />} />

                <Route path="parent/edit-all-students" element={<ParentEditAllStudentsPage />} />
                <Route path="parent/add-emergency-form" element={<ParentAddEmergencyFormPage />} />
                <Route path="parent/add-student-form" element={<ParentAddStudentFormPage />} />

                <Route path="parent/contact" element={<ParentContactPage />} />
                <Route path="parent/enroll-classes" element={<ParentEnrollClassesPage />} />
                <Route path="parent/events" element={<ParentEventsPage />} />
                <Route path="parent/payment" element={<ParentPaymentInvoicesPage />} />
                <Route path="parent/register-student" element={<ParentRegisterStudentPage />} />
                <Route path="parent/report-attendance" element={<ParentReportAttendancePage />} />
                <Route path="parent/attendance-reports" element={<ParentAttendanceReportsHistoryPage />} />
                <Route path="parent/authorized-users" element={<ParentAuthorizedUsersPage />} />
                <Route path="parent/update-profile" element={<ParentUpdateProfileParityPage />} />

                <Route path="parent/home" element={<ParentHomePage />} />
                <Route path="parent/attendance" element={<ParentAttendancePage />} />
                <Route path="parent/add-second-parent" element={<ParentAddSecondParentPage />} />
                <Route path="parent/assignments" element={<ParentAssignmentsPage />} />
                <Route path="parent/calendar" element={<ParentCalendarPage />} />
                <Route path="parent/classes" element={<ParentClassesPage />} />
                <Route path="parent/progress" element={<ParentProgressListPage />} />
                <Route path="parent/invoice-payment" element={<ParentInvoicePaymentPage />} />
                <Route path="parent/no-kids-registered" element={<ParentNoKidsRegisteredPage />} />
                <Route path="parent/message" element={<ParentMessagePage />} />
                <Route path="parent/report-cards" element={<ParentReportCardsPage />} />
                <Route path="parent/scores" element={<ParentScoresPage />} />
                <Route path="parent/success" element={<ParentSuccessMessagePage />} />

                </Route>

                <Route element={<ManagementLayout />}>
                  <Route path="browse" element={<ViewRouteSitemapPage />} />
                  <Route path="*" element={<ViewRoutePlaceholderPage />} />
                </Route>
              </Route>
            </Route>

            <Route path="*" element={<Navigate to="/" replace />} />
          </Routes>
        </Suspense>
      </BrowserRouter>
    </AuthProvider>
  )
}
