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

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

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

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

  return <TrackingSDK pageData={pageTrackingData} />
}
