import ReactDOM from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Layout from "./components/header/Header/Layout";
import Masterplan from "./pages/Masterplan";
import Company from "./pages/Company";
import "./index.css";
import Complex from "./pages/Complex";

const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout />,
    children: [
      {
        path: "/",
        element: <Masterplan />,
      },
      {
        path: "/masterplan",
        element: <Masterplan />,
      },
      {
        path: "/masterplan/:complexId",
        element: <Complex />,
      },
      {
        path: "/company",
        element: <Company />,
      },
    ],
  },
]);

ReactDOM.createRoot(document.getElementById("root")!).render(
  <RouterProvider router={router} />
);
