"use client" import { useIntl } from "react-intl" import { EditIcon } from "@/components/Icons" import Image from "@/components/Image" import Button from "@/components/TempDesignSystem/Button" import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import styles from "./selectedRoomPanel.module.css" import type { Rate, Room, } from "@/types/components/hotelReservation/selectRate/selectRate" import type { RoomData } from "@/types/hotel" interface SelectedRoomPanelProps { roomIndex: number room: Room selectedRate: Rate | null roomCategories: RoomData[] handleModify: () => void } export default function SelectedRoomPanel({ roomIndex, room, selectedRate, roomCategories, handleModify, }: SelectedRoomPanelProps) { const intl = useIntl() const images = roomCategories.find((roomCategory) => roomCategory.roomTypes.some( (roomType) => roomType.code === selectedRate?.roomTypeCode ) )?.images return (