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

// Rangook's type scale (globals.css @theme, DESIGN.md §5).
const twMerge = extendTailwindMerge({
  extend: {
    theme: {
      text: ["micro", "caption", "body-sm", "body", "title-3", "title-2", "title-1", "display", "hero"],
    },
  },
})

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