import { clsx, type ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]): string { return twMerge(clsx(inputs)); } export function formatMoney(value: number | null, currency = "COP"): string { if (value === null) return "Consultar precio"; return new Intl.NumberFormat("es-CO", { style: "currency", currency, maximumFractionDigits: 0, }).format(value); } // Umbral desde el cual mostramos "Quedan N" en vez de solo "Disponible". // inventoryQuantity=null significa inventario no gestionado (backorder / // manage_inventory=false en Medusa) -- ahi nunca mostramos el mensaje. export const LOW_STOCK_THRESHOLD = 5;