import { Suspense } from "react"

import ChildrenWrapper from "@/components/ChildrenWrapper"

import styles from "./layout.module.css"

export default function SelectHotelLayout({
  children,
}: React.PropsWithChildren) {
  return (
    <div className={styles.layout}>
      {/* 
        This Suspense is only needed to prevent useSearchParams from
        making everything rendered client-side 
        https://nextjs.org/docs/14/app/api-reference/functions/use-search-params#static-rendering
      */}
      <Suspense fallback={null}>
        <ChildrenWrapper>{children}</ChildrenWrapper>
      </Suspense>
    </div>
  )
}
