import { createBrowserRouter, Navigate } from "react-router-dom";
import Login from "@/pages/Login";
import Workspace from "@/pages/Workspace";
import PrivateRoute from "@/components/PrivateRoute";

export const router = createBrowserRouter([
  { path: "/login", element: <Login /> },
  {
    path: "/*",
    element: (
      <PrivateRoute>
        <Workspace />
      </PrivateRoute>
    ),
  },
  { path: "/", element: <Navigate to="/home" replace /> },
]);
