import type { Metadata } from "next";
import type { ReactNode } from "react";
import { AuthLayoutShell } from "@/components/auth-page-shell";
import { translate } from "@/lib/i18n-dictionaries";
import { resolveRequestLocale } from "@/lib/i18n-server";

export async function generateMetadata(): Promise<Metadata> {
  const locale = await resolveRequestLocale();

  return {
    title: locale === "ko" ? "오피셜메일" : "OfficialMail",
    description: translate(locale, "auth.shell.description"),
    robots: {
      follow: false,
      index: false,
    },
  };
}

export default function AuthLayout({ children }: { children: ReactNode }) {
  return <AuthLayoutShell>{children}</AuthLayoutShell>;
}
