"use client"
import { useIntl } from "react-intl"

import { formatPrice } from "@/utils/numberFormatting"

import RegularRow from "../Regular"

import type { BedTypeSchema } from "@/types/components/hotelReservation/enterDetails/bedType"

interface BedTypeRowProps {
  bedType: BedTypeSchema | undefined
  currency?: string
}

export default function BedTypeRow({
  bedType,
  currency = "",
}: BedTypeRowProps) {
  const intl = useIntl()

  if (!bedType) {
    return null
  }

  return (
    <RegularRow
      label={bedType.description}
      value={formatPrice(intl, 0, currency)}
    />
  )
}
