import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import { Layout } from "./components/Layout";
import { Dashboard } from "./pages/Dashboard";
import { ServerDetail } from "./pages/ServerDetail";
import { Servers } from "./pages/Servers";
import { WrapperDetail } from "./pages/WrapperDetail";
import { Wrappers } from "./pages/Wrappers";
import "./styles.css";

const router = createBrowserRouter([{ path: "/", element: <Layout />, children: [
  { index: true, element: <Dashboard /> }, { path: "wrappers", element: <Wrappers /> },
  { path: "wrappers/:id", element: <WrapperDetail /> }, { path: "servers", element: <Servers /> },
  { path: "servers/:id", element: <ServerDetail /> }
] }]);
createRoot(document.getElementById("root")!).render(<StrictMode><RouterProvider router={router} /></StrictMode>);
