// AppRoutes.jsx
import React from "react";
import { createBrowserRouter, RouterProvider, Outlet } from "react-router-dom";
// Layouts
import AuthLayout from "../layouts/AuthLayout";
import HomeLayout from "../layouts/HomeLayout";
// Authentication Pages
import LoginPage from "../pages/authentication/LoginPage";
import RegisterPage from "../pages/authentication/RegisterPage";
import ForgotPasswordPage from "../pages/authentication/ForgotPasswordPage";
import ResetPasswordPage from "../pages/authentication/ResetPasswordPage";
// Home & Protected Pages
import Dashboard from "../components/Dashboard/Dashboard";
import ProjectList from "../pages/project/ProjectList";
import ProjectDetails from "../pages/project/ProjectDetails";
import ManageProject from "../components/Project/ManageProject";
import EmployeeList from "../pages/employee/EmployeeList";
// import ManageEmp from "../pages/employee/ManageEmp";
import EmployeeProfile from "../pages/employee/EmployeeProfile";
import Inventory from "../pages/project/Inventory";
import AttendancePage from "../pages/Activities/AttendancePage";
import DailyTask from "../pages/Activities/DailyTask";
import TaskPlannng from "../pages/Activities/TaskPlannng";
import Reports from "../pages/reports/Reports";
import ImageGallary from "../pages/Gallary/ImageGallary";
import MasterPage from "../pages/master/MasterPage";
import Support from "../pages/support/Support";
import Documentation from "../pages/support/Documentation";
import Connect from "../pages/support/Connect";
import ErrorPage from "../pages/ErrorPage";
import LegalInfoCard from "../pages/TermsAndConditions/LegalInfoCard";
// Protected Route Wrapper
import ProtectedRoute from "./ProtectedRoute";
import Directory from "../pages/Directory/Directory";
const router = createBrowserRouter(
[
{
element: ,
children: [
{ path: "/auth/login", element: },
{ path: "/auth/reqest/demo", element: },
{ path: "/auth/forgot-password", element: },
{ path: "/reset-password", element: },
{ path: "/legal-info", element: },
],
},
{
element: ,
errorElement: ,
children: [
{
element: ,
children: [
{ path: "/", element: },
{ path: "/dashboard", element: },
{ path: "/projects", element: },
{ path: "/projects/:projectId", element: },
{ path: "/project/manage/:projectId", element: },
{ path: "/employees", element: },
{ path: "/employee/:employeeId", element: },
// { path: "/employee/manage", element: },
// {path: "/employee/manage/:employeeId", element: },
{ path: "/directory", element: },
{ path: "/inventory", element: },
{ path: "/activities/attendance", element: },
{ path: "/activities/records/:projectId?", element: },
{ path: "/activities/task", element: },
{ path: "/activities/reports", element: },
{ path: "/activities/gallary", element: },
{ path: "/masters", element: },
{ path: "/help/support", element: },
{ path: "/help/docs", element: },
{ path: "/help/connect", element: },
],
},
],
},
{
path: "*",
element: ,
},
],
{
// ✅ Enables the v7 splat path resolution behavior
future: {
v7_relativeSplatPath: true,
v7_startTransition: true,
v7_fetcherPersist: true,
v7_normalizeFormMethod: true,
v7_partialHydration: true,
v7_skipActionErrorRevalidation: true,
},
}
);
const AppRoutes = () => {
return ;
};
export default AppRoutes;