import { lazy } from "react";
import { Route } from "react-router-dom";
import HomeLayout from "../layout/HomeLayout";

const HomePage = lazy(() => import("../pages/HomePage"));
const LoginPage = lazy(() => import("../pages/auth/LoginPage"));
const ForgotPasswordPage = lazy(() => import("../pages/auth/ForgotPasswordPage"));
const StepperForm = lazy(() => import("../feature/StepperForm"));
const NotFound = lazy(() => import("../pages/NotFound"));
const PublicRoutes = () => {
  return (
    <>
      <Route element={<HomeLayout />}>
           <Route path="/" element={<HomePage />} />
            <Route path="/registration" element={<StepperForm />} />

       </Route>

         <Route path="/login" element={<LoginPage />} />
         <Route path="/forgot-password" element={<ForgotPasswordPage />} />
       
      {/* 404 route MUST be last */}
        <Route path="*" element={<NotFound />} />
    </>
  )
}

export default PublicRoutes
