import type { Metadata } from "next";
import AuthProviders from "./AuthProviders";
import { getGoogleClientId } from "@/lib/auth/googleClientId";
import { generateSeoPageMetadata } from "@/lib/i18n/server";

export const dynamic = "force-dynamic";

export async function generateMetadata(): Promise<Metadata> {
  return generateSeoPageMetadata("auth", { index: false });
}

export default function AuthLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const googleClientId = getGoogleClientId();

  return (
    <AuthProviders googleClientId={googleClientId}>{children}</AuthProviders>
  );
}
