"use client" import { useSession } from "next-auth/react" import { useIntl } from "react-intl" import { Typography } from "@scandic-hotels/design-system/Typography" import { selectRate } from "@/constants/routes/hotelReservation" import { FacilityToIcon } from "@/components/ContentType/HotelPage/data" import Button from "@/components/TempDesignSystem/Button" import Link from "@/components/TempDesignSystem/Link" import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { isValidClientSession } from "@/utils/clientSession" import HotelPointsRow from "../../HotelCard/HotelPointsRow" import NoPriceAvailableCard from "../../HotelCard/NoPriceAvailableCard" import HotelCardDialogImage from "../HotelCardDialogImage" import styles from "../hotelCardDialog.module.css" import type { HotelPin } from "@/types/components/hotelReservation/selectHotel/map" import type { Lang } from "@/constants/languages" interface ListingHotelCardProps { data: HotelPin lang: Lang imageError: boolean setImageError: (error: boolean) => void } export default function ListingHotelCardDialog({ data, lang, imageError, setImageError, }: ListingHotelCardProps) { const intl = useIntl() const { data: session } = useSession() const isUserLoggedIn = isValidClientSession(session) const { bookingCode, name, publicPrice, memberPrice, currency, amenities, images, ratings, operaId, redemptionPrice, chequePrice, voucherPrice, } = data const firstImage = images[0]?.imageSizes?.small const altText = images[0]?.metaData?.altText return (