"use client"
import { useMyStayStore } from "@/stores/my-stay"

import PriceType from "../PriceType"

import type { PriceType as _PriceType } from "@/types/components/hotelReservation/myStay/myStay"

export default function TotalPrice() {
  const { bookedRoom, formattedTotalPrice } = useMyStayStore((state) => ({
    bookedRoom: state.bookedRoom,
    formattedTotalPrice: state.totalPrice,
  }))

  return (
    <PriceType
      cheques={bookedRoom.cheques}
      formattedTotalPrice={formattedTotalPrice}
      isCancelled={bookedRoom.isCancelled}
      priceType={bookedRoom.priceType}
      rateDefinition={bookedRoom.rateDefinition}
      roomPoints={bookedRoom.roomPoints}
      totalPrice={bookedRoom.totalPrice}
      vouchers={bookedRoom.vouchers}
    />
  )
}
