import ReactDOM from "react-dom/client";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import MainPage from "./pages/MainPage";
import App from "./App";
import "./index.css";
import Layout from "./components/Layout";
import ButtomPanelModal from "./components/mobile/Appartment/ButomPanelModal";

const router = createBrowserRouter([
  {
    path: "/",
    element: <Layout />,
    children: [
      {
        path: "/:villaTitle",

        element: <App />,
      },
      {
        path: "/",
        element: <MainPage />,
        // element: <ButtomPanelModal />,
      },
    ],
  },
]);

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