import { createBrowserRouter } from "react-router-dom";
import { ProtectedRoute } from "./protected_route";
import { LoginPage } from "../../presentation/login/login_page";

// Create the router configuration
export const router = createBrowserRouter([
  {
    // Protected routes that require authentication
    element: <ProtectedRoute />,
    children: [
      {
        // Default route for authenticated users
        index: true,
        path: "/",
        element: <div></div>
      }
    ]
  },
  {
    // Public route for login page
    element: <LoginPage />,
    children: [
      {
        // Route for login page
        path: "/login",
        element: <LoginPage />
      }
    ]
  }
]);