'use server';
import { AuthLayout } from "@/layouts/auth/layout";
import { AuthServerProps } from "@/validations/mutual/pages/props";
import getPage from "@/webPages/getPage";

const AuthPageEn = async ({ params, searchParams }: AuthServerProps) => {
    const lang = "en";
    const awaitedParams = await params;
    const awaitedSearchParams = await searchParams;
    const pageUrlFromParams = `/${awaitedParams.page?.join("/")}` || "/login";
    const FoundPage = getPage(pageUrlFromParams, { language: lang, query: awaitedSearchParams });
    return <AuthLayout lang={lang} page={FoundPage} activePageUrl={pageUrlFromParams} />
}

export default AuthPageEn;
