mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 12:00:59 +00:00
21 lines
528 B
TypeScript
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 || "—";
|
|
}
|
|
}
|