import { ModuleClientParams } from "@erp/core/client";
import { Outlet, RouteObject } from "react-router-dom";
import { AuthLayout } from "./components";
import { LoginPage } from "./pages";

export const AuthRoutes = (params: ModuleClientParams): RouteObject[] => {
  return [
    {
      path: "*",
      element: (
        <AuthLayout>
          <Outlet context={params} />
        </AuthLayout>
      ),
      children: [
        {
          path: "login",
          element: <LoginPage />,
        },
        {
          path: "register",
          element: <div>Register</div>,
        },
      ],
    },
  ];
};
