import type { InventoryItemStatus } from "@mrp/shared/dist/inventory/types.js";

import { inventoryStatusPalette } from "./config";

const labels: Record<InventoryItemStatus, string> = {
  DRAFT: "Draft",
  ACTIVE: "Active",
  OBSOLETE: "Obsolete",
};

export function InventoryStatusBadge({ status }: { status: InventoryItemStatus }) {
  return (
    <span className={`inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold uppercase tracking-[0.14em] ${inventoryStatusPalette[status]}`}>
      {labels[status]}
    </span>
  );
}
