// Minimal cn() utility — mirrors web/src/lib/utils.ts
// The doc components import @/lib/utils; this file satisfies that import
// without pulling in the full dashboard dependency tree.

type ClassValue = string | number | boolean | undefined | null | ClassValue[];

function clsx(...args: ClassValue[]): string {
  const classes: string[] = [];
  for (const arg of args) {
    if (!arg) continue;
    if (typeof arg === "string" || typeof arg === "number") {
      classes.push(String(arg));
    } else if (Array.isArray(arg)) {
      const inner = clsx(...arg);
      if (inner) classes.push(inner);
    }
  }
  return classes.join(" ");
}

// Simplified tw-merge: just join classes (no conflict resolution needed for docs)
export function cn(...inputs: ClassValue[]): string {
  return clsx(...inputs);
}
