import { serverClient } from "@/lib/trpc/server"

import HotelCard from "@/components/HotelReservation/SelectHotel/HotelCard"

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

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

export default async function SelectHotelPage({
  params,
}: PageArgs<LangParams>) {
  const hotel = await serverClient().hotel.getHotel({
    hotelId: "Stockholm",
    language: params.lang,
  })

  const hotels = [hotel]

  return (
    <main>
      <section className={styles.section}>
        {hotels.map((hotel) => (
          <HotelCard key={hotel.name} hotel={hotel} />
        ))}
      </section>
    </main>
  )
}
