import { Zap, Clock } from "lucide-react"; import { Stack, Text } from "@mantine/core"; import type { BookingDetail } from "@/types/booking"; import { BookingActionsMenu } from "./BookingActionsMenu"; import { SectionCard } from "./detail/SectionCard"; import { toBookingListRow } from "@/features/bookings/mapBookingListRow"; import type { useBookingMutations } from "@/hooks/bookings/useBookings"; type Mutations = ReturnType; interface BookingActionsToolbarProps { booking: BookingDetail; mutations: Mutations; } /** Detail-page actions: primary staff-action toolbar. */ export function BookingActionsToolbar({ booking }: BookingActionsToolbarProps) { const row = toBookingListRow(booking); const { status } = booking; if (status === "REJECTED" || status === "CANCELLED" || status === "COMPLETED") { return null; } if (status === "CHANGES_REQUESTED") { return ( No staff actions until resubmit. {booking.latestChangeRequestNote && ( {booking.latestChangeRequestNote} )} ); } if (["DRAFT", "PENDING_CONSOLIDATION", "CONSOLIDATED"].includes(status)) { return ( Monitor until the customer or system advances status. ); } if ( ["FULLY_EXECUTED", "PNR_GENERATED", "PAYMENT_VERIFICATION_IN_PROGRESS"].includes( status, ) ) { return ( Payment is completed by the customer. The booking status updates automatically once payment is confirmed, then moves to Operations. {status === "FULLY_EXECUTED" && ( )} ); } return ( Confirm each step before it is applied. ); }