"use client"

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

import Price from "../PriceType/Price"

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

export default function TotalPrice() {
  const { bookedRoom, totalPrice } = useMyStayStore((state) => ({
    bookedRoom: state.bookedRoom,
    totalPrice: state.totalPrice,
  }))
  return (
    <Price
      isCancelled={bookedRoom.isCancelled}
      isMember={bookedRoom.rateDefinition.isMemberRate}
      price={totalPrice}
    />
  )
}
