Files
edr-platform/apps/edr-freight-web/backoffice/src/lib/utils.ts
2026-07-21 13:24:05 +00:00

21 lines
528 B
TypeScript

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 || "—";
}
}