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

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

/**
 * Helper function to construct responsive classes that apply only above a breakpoint.
 * This is useful for conditionally applying classes like `lg:flex` or `md:hidden`.
 * 
 * @param breakpoint - The breakpoint prefix (e.g., 'sm', 'md', 'lg')
 * @param baseClass - The base Tailwind class (e.g., 'flex', 'hidden', 'grid-cols-2')
 * @returns A string with the responsive class (e.g., 'lg:flex')
 */
export function responsiveClass(breakpoint: string, baseClass: string): string {
  return `${breakpoint}:${baseClass}`;
}