import "@scandic-hotels/design-system/fonts.css" import "@scandic-hotels/design-system/style.css" import "@scandic-hotels/design-system/normalize.css" import "@scandic-hotels/design-system/design-system-new-deprecated.css" import "../../globals.css" import { ReactQueryDevtools } from "@tanstack/react-query-devtools" import Script from "next/script" import { SessionProvider } from "next-auth/react" import { BookingFlowConfig } from "@scandic-hotels/booking-flow/BookingFlowConfig" import { NuqsAdapter } from "@scandic-hotels/booking-flow/utils/nuqs" import { Lang } from "@scandic-hotels/common/constants/language" import { bookingTermsAndConditionsRoutes } from "@scandic-hotels/common/constants/routes/bookingTermsAndConditionsRoutes" import { customerService } from "@scandic-hotels/common/constants/routes/customerService" import { myStay } from "@scandic-hotels/common/constants/routes/myStay" import { privacyPolicyRoutes } from "@scandic-hotels/common/constants/routes/privacyPolicyRoutes" import { ToastHandler } from "@scandic-hotels/design-system/ToastHandler" import AdobeSDKScript from "@/components/AdobeSDKScript" import CookieBotConsent from "@/components/CookieBotConsent" import GTMScript from "@/components/GTMScript" import { RACRouterProvider } from "@/components/RACRouterProvider" import RouteChange from "@/components/RouteChange" import { SiteWideAlert } from "@/components/SitewideAlert" import TrpcProvider from "@/components/TrpcProvider" import { FontPreload } from "@/fonts/font-preloading" import { getMessages } from "@/i18n" import ClientIntlProvider from "@/i18n/Provider" import { setLang } from "@/i18n/serverContext" import { BookingFlowProviders } from "../../components/BookingFlowProviders" import { Footer } from "../../components/Footer/Footer" import { Header } from "../../components/Header/Header" import type { LangRoute } from "@scandic-hotels/common/constants/routes/langRoute" import type { Metadata } from "next" export const metadata: Metadata = { description: "TODO This text should be updated.", } type LangParams = { lang: Lang } type RootLayoutProps = { children: React.ReactNode params: Promise bookingwidget: React.ReactNode } export default async function RootLayout(props: RootLayoutProps) { const params = await props.params const lang = params.lang const { children } = props const parsedLanguage = setLang(lang) const messages = await getMessages(parsedLanguage) const bookingFlowConfig: BookingFlowConfig = { bookingCodeEnabled: false, variant: "partner-sas", routes: { myStay: routeToScandicWeb(myStay), bookingTermsAndConditions: routeToScandicWeb( bookingTermsAndConditionsRoutes ), customerService: routeToScandicWeb(customerService), privacyPolicy: routeToScandicWeb(privacyPolicyRoutes), }, } return ( {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{props.bookingwidget}
{children}