function y(t) {
  var e, n, a = "";
  if (typeof t == "string" || typeof t == "number") a += t;
  else if (typeof t == "object") if (Array.isArray(t)) {
    var r = t.length;
    for (e = 0; e < r; e++) t[e] && (n = y(t[e])) && (a && (a += " "), a += n);
  } else for (n in t) t[n] && (a && (a += " "), a += n);
  return a;
}
function j() {
  for (var t, e, n = 0, a = "", r = arguments.length; n < r; n++) (t = arguments[n]) && (e = y(t)) && (a && (a += " "), a += e);
  return a;
}
const f = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, m = j, A = (t, e) => (n) => {
  var a;
  if (e?.variants == null) return m(t, n?.class, n?.className);
  const { variants: r, defaultVariants: u } = e, V = Object.keys(r).map((l) => {
    const i = n?.[l], o = u?.[l];
    if (i === null) return null;
    const s = f(i) || f(o);
    return r[l][s];
  }), v = n && Object.entries(n).reduce((l, i) => {
    let [o, s] = i;
    return s === void 0 || (l[o] = s), l;
  }, {}), b = e == null || (a = e.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, i) => {
    let { class: o, className: s, ...N } = i;
    return Object.entries(N).every((C) => {
      let [c, d] = C;
      return Array.isArray(d) ? d.includes({
        ...u,
        ...v
      }[c]) : {
        ...u,
        ...v
      }[c] === d;
    }) ? [
      ...l,
      o,
      s
    ] : l;
  }, []);
  return m(t, V, b, n?.class, n?.className);
};
export {
  m as a,
  j as b,
  A as c
};
//# sourceMappingURL=index-BmAFn37q.mjs.map
