import { Badge, ScrollArea, Tabs } from "@mantine/core"; import { ClipboardCheck, FileSignature, Inbox, LayoutGrid, ShieldCheck, Truck, XCircle, } from "lucide-react"; import "@/components/overview/overview.css"; import { CONTRACT_LIST_TABS, type ContractStatusTabKey, } from "@/features/contracts/contract-status.config"; const TAB_ICONS: Record = { all: , intake: , in_approval: , approved_contract: , clearance: , active: , closed: , }; interface ContractStatusTabsProps { active: ContractStatusTabKey; onChange: (tab: ContractStatusTabKey) => void; counts?: Partial>; } export function ContractStatusTabs({ active, onChange, counts, }: ContractStatusTabsProps) { return ( onChange((value as ContractStatusTabKey) ?? "all")} variant="pills" color="edr-green" keepMounted={false} classNames={{ list: "ov-tablist", tab: "ov-tab" }} > {CONTRACT_LIST_TABS.map((tab) => { const isActive = active === tab.key; const count = counts?.[tab.key]; return ( {count} ) : undefined } > {tab.label} ); })} ); } export type { ContractStatusTabKey };