import { AlternativeHotelsMapPage as AlternativeHotelsMapPagePrimitive } from "@scandic-hotels/booking-flow/pages/AlternativeHotelsMapPage"

import TrackingSDK from "@/components/TrackingSDK"
import { getLang } from "@/i18n/serverContext"

import type { LangParams, PageArgs } from "@/types/params"

export default async function AlternativeHotelsMapPage(
  props: PageArgs<LangParams>
) {
  const searchParams = await props.searchParams
  const lang = await getLang()

  return (
    <div>
      <AlternativeHotelsMapPagePrimitive
        lang={lang}
        searchParams={searchParams}
        renderTracking={(props) => (
          <TrackingSDK
            hotelInfo={props.hotelsTrackingData}
            pageData={props.pageTrackingData}
          />
        )}
      />
    </div>
  )
}
