import { Route, Routes } from "@solidjs/router";
import { Component, lazy } from "solid-js";

const Home = lazy(() => import("./views/home/Home"));
const AuthLayout = lazy(() => import("./views/auth/AuthLayout"));
const Login = lazy(() => import("./views/auth/Login"));
const Register = lazy(() => import("./views/auth/Register"));
const VerifyEmail = lazy(() => import("./views/auth/VerifyEmail"));
const AppRouter: Component = () => {
  return (
    <Routes>
      <Route path="/" element={<Home />}></Route>
      <Route path="/auth" element={<AuthLayout />}>
        <Route path="/login" element={<Login />}></Route>
        <Route path="/register" element={<Register />}></Route>
        <Route path="/verify-email" element={<VerifyEmail />}></Route>
      </Route>
    </Routes>
  );
};

export default AppRouter;
