"use client"

import BookingCodeChip from "@/components/BookingCodeChip"

import styles from "./row.module.css"

interface BookingCodeRowProps {
  bookingCode?: string
  isBreakfastIncluded?: boolean
  isCampaignRate?: boolean
}

export default function BookingCodeRow({
  bookingCode,
  isBreakfastIncluded,
  isCampaignRate,
}: BookingCodeRowProps) {
  if (!bookingCode) {
    return null
  }

  return (
    <tr className={styles.row}>
      <td colSpan={2} align="left">
        <BookingCodeChip
          bookingCode={bookingCode}
          isBreakfastIncluded={isBreakfastIncluded}
          isCampaign={isCampaignRate}
        />
      </td>
    </tr>
  )
}
