import { NextIntlClientProvider } from "next-intl";
import { getMessages } from "next-intl/server";
import { messagesWith } from "@/lib/messages";

/**
 * The sample reports are marketing pages, but they render the practitioner and
 * individual report copy. Those namespaces are no longer in the base set, so
 * they are added here — just the two, not the whole signed-in bundle, since
 * these pages are part of the public funnel and their weight matters.
 */
export default async function SampleReportLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  const messages = await getMessages();

  return (
    <NextIntlClientProvider
      messages={messagesWith(messages, ["practitioner", "individual"])}
    >
      {children}
    </NextIntlClientProvider>
  );
}
