import {
  TrackingChannelEnum,
  type TrackingSDKPageData,
} from "@scandic-hotels/common/tracking/types"

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

export default async function Tracking() {
  const lang = await getLang()

  const pageTrackingData: TrackingSDKPageData = {
    channel: TrackingChannelEnum.hotels,
    domainLanguage: lang,
    pageId: "receipt",
    pageName: `hotelreservation|my-stay|receipt`,
    pageType: "bookingreceiptpage",
    siteSections: `hotelreservation|my-stay|receipt`,
    siteVersion: "new-web",
  }

  return <TrackingSDK pageData={pageTrackingData} />
}
