'use strict';

var clsx = require('clsx');
var tailwindMerge = require('tailwind-merge');

// lib/utils.ts
function cn(...inputs) {
  return tailwindMerge.twMerge(clsx.clsx(inputs));
}
var BRIGHTNESS_CLASS_MAP = {
  "10": "brightness-[.1]",
  "20": "brightness-[.2]",
  "25": "brightness-[.25]",
  "30": "brightness-[.3]",
  "40": "brightness-[.4]",
  "50": "brightness-50",
  "75": "brightness-75",
  "100": "brightness-100"
};
function getNestedCardBg(parentBg, variant = "muted", options) {
  if (options?.override) return options.override;
  if (options?.disableInversion) {
    return `bg-${variant}`;
  }
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
  if (isDark) {
    switch (variant) {
      case "muted":
        return "bg-background";
      case "card":
        return "bg-card";
      case "accent":
        return "bg-accent";
      case "subtle":
        return "bg-background/50";
    }
  } else {
    switch (variant) {
      case "muted":
        return "bg-muted";
      case "card":
        return "bg-card";
      case "accent":
        return "bg-accent";
      case "subtle":
        return "bg-muted/50";
    }
  }
}
function getNestedCardTextColor(parentBg, options) {
  if (options?.override) return options.override;
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
  return isDark ? "text-foreground" : "";
}
function getTextColor(parentBg, variant = "default", options) {
  if (options?.override) return options.override;
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
  if (isDark) {
    switch (variant) {
      case "default":
        return "text-foreground";
      case "muted":
        return "text-foreground/80";
      case "subtle":
        return "text-foreground/60";
      case "accent":
        return "text-accent-foreground";
    }
  } else {
    switch (variant) {
      case "default":
        return "text-foreground";
      case "muted":
        return "text-muted-foreground";
      case "subtle":
        return "text-muted-foreground/70";
      case "accent":
        return "text-primary";
    }
  }
}
function getAccentColor(parentBg, options) {
  if (options?.override) return options.override;
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
  return isDark ? "text-accent-foreground" : "text-primary";
}
function getBorderColor(parentBg, variant = "default", options) {
  if (options?.override) return options.override;
  const isDark = parentBg === "dark" || parentBg === "secondary" || parentBg === "primary";
  if (isDark) {
    switch (variant) {
      case "default":
        return "border-foreground/20";
      case "muted":
        return "border-foreground/10";
      case "accent":
        return "border-accent-foreground";
    }
  } else {
    switch (variant) {
      case "default":
        return "border-border";
      case "muted":
        return "border-muted";
      case "accent":
        return "border-primary";
    }
  }
}

exports.BRIGHTNESS_CLASS_MAP = BRIGHTNESS_CLASS_MAP;
exports.cn = cn;
exports.getAccentColor = getAccentColor;
exports.getBorderColor = getBorderColor;
exports.getNestedCardBg = getNestedCardBg;
exports.getNestedCardTextColor = getNestedCardTextColor;
exports.getTextColor = getTextColor;
