import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Root from "./Root.jsx";
import Contact from "./pages/Contact.jsx";
import NotFound from "./pages/NotFound.jsx";
import Home from "./pages/Home";
import About from "./pages/About";
import Services from "./pages/Services";
import UpcomingEvents from "./pages/UpcomingEvents";
import HowToBecomeAChristian from "./pages/HowToBecomeAChristian";
import OnlineGiving from "./pages/OnlineGiving";
import HelpfulLinks from "./pages/HelpfulLinks";
import ChurchStaff from "./pages/ChurchStaff";
const router = createBrowserRouter([
  {
    path: "/",
    element: <Root />,
    errorElement: <NotFound />,
    children: [
      {
        path: "/",
        element: <Home />,
      },
      {
        element: <UpcomingEvents />,
        path: "/events",
      },
      {
        element: <Services />,
        path: "/services",
      },
      {
        element: <About />,
        path: "/about",
      },
      {
        element: <Contact />,
        path: "/contact",
      },
      {
        element: <HowToBecomeAChristian />,
        path: "/become-a-christian",
      },
      {
        element: <OnlineGiving />,
        path: "/tithing",
      },
      {
        element: <HelpfulLinks />,
        path: "/links",
      },
      {
        element: <ChurchStaff />,
        path: "/church-staff",
      }
      //  {
      //     name: "Rocks Cry Out Youth Ministry",
      //     path: "/rocks-cry-out-youth-ministry",
      // },
    ],
  },
]);

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