import { createBrowserRouter, RouterProvider } from "react-router-dom";

// TODO: finish this
const _router = createBrowserRouter([
  {
    path: "/",
    lazy: () => import("./Layout"),
    children: [
      {
        path: "/",
        lazy: () => import("./Start"),
      },
      {
        path: "/match/*",
        lazy: () => import("./NewMatch"),
      },
      {
        path: "/build",
        lazy: () => import("./BuildDeck"),
      },
      {
        path: "/profile",
        lazy: () => import("./NewProfile"),
      },
      {
        path: "/waitroom",
        lazy: () => import("./NewWaitRoom"),
      },
      {
        path: "/duel/:ip/:player/:passWd",
        lazy: () => import("./Duel/Main"),
      },
    ],
  },
]);

export const NeosRouter = () => <RouterProvider router={_router} />;
