import { BrowserRouter, Routes, Route } from "react-router-dom";
import { ToastContainer } from "react-toastify";
import Home from "./components/Home";
import About from "./components/About";
import Contact from "./components/Contact";
import Register from "./components/Register";
import Login from "./components/Login";
import Dashboard from "./components/Dashboard";
import PrivateRoute from "./components/PrivateRoute";
import VerifyUser from "./components/EmailVerify";
import ForgotPassword from "./components/ForgotPassword";
import ResetPassword from "./components/ResetPassword";
// import Addproperty from "./components/Addproperty";
import Registrationsuccess from "./components/Registrationsuccess";
import PropertyView from "./components/PropertyView";
import SearchMysql from "./components/SearchMysql";
import Services from "./components/Services";


const App = () => {
  return (
    <BrowserRouter>
      <ToastContainer />
      <Routes>
        <Route path="/" element={<Home />}></Route>
        <Route path="/about" element={<About />}></Route>
        <Route path="/services" element={<Services />}></Route>
        <Route path="/contact" element={<Contact />}></Route>
        <Route path="/register" element={<Register />}></Route>

        <Route
          path="/registrationsuccess"
          element={
            <PrivateRoute>
              <Registrationsuccess />
            </PrivateRoute>
          }
        ></Route>

        <Route path="/login" element={<Login />}></Route>
        <Route
          path="/dashboard"
          element={
            <PrivateRoute>
              <Dashboard />
            </PrivateRoute>
          }
        />
        <Route path="/users/:id/verify/:token" element={<VerifyUser />} />

        <Route path="/forgotpassword" element={<ForgotPassword />}></Route>

        <Route
          path="/users/resetpassword/:userId/:token"
          element={<ResetPassword />}
        />

        {/* <Route path="/addproperty" element={  <PrivateRoute><Addproperty /></PrivateRoute>}></Route> */}

        <Route path="/property/:id" element={<PropertyView />} />

        <Route path="/searchmyproperties" element={<SearchMysql />} />


      </Routes>
    </BrowserRouter>
  );
};

export default App;
