import BiroScript from "@/components/TempDesignSystem/Text/BiroScript"
import Title from "@/components/TempDesignSystem/Text/Title"
import { getIntl } from "@/i18n"

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

import type { BookingConfirmation } from "@/types/trpc/routers/booking/confirmation"

export async function Header({ hotel }: Pick<BookingConfirmation, "hotel">) {
  const intl = await getIntl()
  return (
    <header>
      <Title as="h2" color="white" className={styles.title} textAlign="center">
        <BiroScript type="two" tilted="medium">
          {intl.formatMessage({ id: "My stay at" })}{" "}
        </BiroScript>
        <span className={styles.hotelName}>{hotel.name}</span>
        {hotel.cityName}
      </Title>
    </header>
  )
}
