import { cn } from "@/lib/cn";

interface LabelProps extends React.HTMLAttributes<HTMLSpanElement> {
  prefix?: string;
}

/**
 * Mini-label éditorial : mono, uppercase, 11px, tracking-label, muted.
 * Ex: <Label prefix="[ 01 ]">À PROPOS</Label>
 */
export function Label({ prefix, className, children, ...props }: LabelProps) {
  return (
    <span
      className={cn(
        "font-mono text-[11px] uppercase tracking-label text-muted",
        className,
      )}
      {...props}
    >
      {prefix ? <span className="mr-2 text-ink">{prefix}</span> : null}
      {children}
    </span>
  );
}
