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

const AuthPageTr = async ({ params, searchParams }: AuthServerProps) => {
    const lang = "tr";
    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 AuthPageTr;
