import { CheckCircle, ClipboardCheck, FileSignature, Inbox, LayoutGrid, Train, Wallet, XCircle, } from "lucide-react"; import { Group, Badge, UnstyledButton, Text } from "@mantine/core"; import { BOOKING_LIST_TABS, type BookingStatusTabKey, } from "@/features/bookings/booking-status.config"; const TAB_ICONS: Record = { all: , intake: , in_approval: , approved_contract: , payment: , operations: , completed: , closed: , }; interface BookingStatusTabsProps { active: BookingStatusTabKey; onChange: (tab: BookingStatusTabKey) => void; counts?: Partial>; } export function BookingStatusTabs({ active, onChange, counts, }: BookingStatusTabsProps) { return ( {BOOKING_LIST_TABS.map((tab) => { const isActive = active === tab.key; const count = counts?.[tab.key]; return ( onChange(tab.key)} style={{ background: isActive ? "white" : "transparent", border: isActive ? "1px solid var(--mantine-color-green-3)" : "1px solid var(--mantine-color-gray-2)", borderRadius: "10px", padding: "10px 16px", transition: "all 0.2s ease", cursor: "pointer", boxShadow: isActive ? "0 2px 8px rgba(34, 197, 94, 0.1)" : "none", }} >
{TAB_ICONS[tab.key]}
{tab.label}
{count !== undefined && count > 0 && ( {count} )}
); })}
); } export type { BookingStatusTabKey };