import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
  return twMerge(clsx(inputs));
}

/** Human label for a trade direction — DOMESTIC reads "Intercity" everywhere. */
export function directionLabel(direction?: string | null): string {
  switch (direction) {
    case "IMPORT":
      return "Import";
    case "EXPORT":
      return "Export";
    case "DOMESTIC":
      return "Intercity";
    default:
      return direction || "—";
  }
}
