import type { ReactNode } from "react";

import "@/styles/site.css";

/**
 * The root layout is deliberately thin.
 *
 * `lang` and `dir` on <html>, and `data-page` on <body>, are per-page values —
 * this site is bilingual with an RTL default, and 29 stylesheet rules are
 * scoped to `data-page`. They cannot be fixed here. SiteChrome sets them from
 * the resolved payload.
 *
 * Next requires <html> and <body> to be emitted by the root layout, so this
 * file owns the tags and SiteChrome owns their attributes, via the script
 * below. The alternative — making the root layout async and resolving the
 * locale here — would run the content lookup twice per request.
 */
export const metadata = {
  // Deliberately empty: every real value comes from generateMetadata in the
  // catch-all route, sourced from the API. Nothing is defaulted here, because a
  // default title that leaks onto a real page is worse than no title at all.
};

export default function RootLayout({ children }: { children: ReactNode }) {
  return (
    <html suppressHydrationWarning>
      <body suppressHydrationWarning>{children}</body>
    </html>
  );
}
