import { y as f } from "./index.D1n9HtNk.js";
const O = { asChild: { type: "boolean" } }, k = { width: { type: "string", className: "rt-r-w", customProperties: ["--width"], responsive: !0 }, minWidth: { type: "string", className: "rt-r-min-w", customProperties: ["--min-width"], responsive: !0 }, maxWidth: { type: "string", className: "rt-r-max-w", customProperties: ["--max-width"], responsive: !0 } }, g = ["gray", "gold", "bronze", "brown", "yellow", "amber", "orange", "tomato", "red", "ruby", "crimson", "pink", "plum", "purple", "violet", "iris", "indigo", "blue", "cyan", "teal", "jade", "green", "grass", "lime", "mint", "sky"], A = { color: { type: "enum", values: g, default: void 0 } }, W = { color: { type: "enum", values: g, default: "" } }, C = { highContrast: { type: "boolean", className: "rt-high-contrast", default: void 0 } }, d = ["initial", "xs", "sm", "md", "lg", "xl"];
function N(o, s) {
  return Object.prototype.hasOwnProperty.call(o, s);
}
function p(o) {
  return typeof o == "object" && Object.keys(o).some((s) => d.includes(s));
}
function P({ className: o, customProperties: s, ...i }) {
  const u = b({ allowArbitraryValues: !0, className: o, ...i }), r = w({ customProperties: s, ...i });
  return [u, r];
}
function b({ allowArbitraryValues: o, value: s, className: i, propValues: u, parseValue: r = (n) => n }) {
  const n = [];
  if (s) {
    if (typeof s == "string" && u.includes(s)) return y(i, s, r);
    if (p(s)) {
      const a = s;
      for (const t in a) {
        if (!N(a, t) || !d.includes(t)) continue;
        const e = a[t];
        if (e !== void 0) {
          if (u.includes(e)) {
            const c = y(i, e, r), m = t === "initial" ? c : `${t}:${c}`;
            n.push(m);
          } else if (o) {
            const c = t === "initial" ? i : `${t}:${i}`;
            n.push(c);
          }
        }
      }
      return n.join(" ");
    }
    if (o) return i;
  }
}
function y(o, s, i) {
  const u = o ? "-" : "", r = i(s), n = r?.startsWith("-"), a = n ? "-" : "", t = n ? r?.substring(1) : r;
  return `${a}${o}${u}${t}`;
}
function w({ customProperties: o, value: s, propValues: i, parseValue: u = (r) => r }) {
  let r = {};
  if (!(!s || typeof s == "string" && i.includes(s))) {
    if (typeof s == "string" && (r = Object.fromEntries(o.map((n) => [n, s]))), p(s)) {
      const n = s;
      for (const a in n) {
        if (!N(n, a) || !d.includes(a)) continue;
        const t = n[a];
        if (!i.includes(t)) for (const e of o) r = { [a === "initial" ? e : `${e}-${a}`]: t, ...r };
      }
    }
    for (const n in r) {
      const a = r[n];
      a !== void 0 && (r[n] = u(a));
    }
    return r;
  }
}
function v(...o) {
  let s = {};
  for (const i of o) i && (s = { ...s, ...i });
  return Object.keys(s).length ? s : void 0;
}
function V(...o) {
  return Object.assign({}, ...o);
}
function z(o, ...s) {
  let i, u;
  const r = { ...o }, n = V(...s);
  for (const a in n) {
    let t = r[a];
    const e = n[a];
    if (e.default !== void 0 && t === void 0 && (t = e.default), e.type === "enum" && ![e.default, ...e.values].includes(t) && !p(t) && (t = e.default), r[a] = t, "className" in e && e.className) {
      delete r[a];
      const c = "responsive" in e;
      if (!t || p(t) && !c) continue;
      if (p(t) && (e.default !== void 0 && t.initial === void 0 && (t.initial = e.default), e.type === "enum" && ([e.default, ...e.values].includes(t.initial) || (t.initial = e.default))), e.type === "enum") {
        const m = b({ allowArbitraryValues: !1, value: t, className: e.className, propValues: e.values, parseValue: e.parseValue });
        i = f(i, m);
        continue;
      }
      if (e.type === "string" || e.type === "enum | string") {
        const m = e.type === "string" ? [] : e.values, [$, h] = P({ className: e.className, customProperties: e.customProperties, propValues: m, parseValue: e.parseValue, value: t });
        u = v(u, h), i = f(i, $);
        continue;
      }
      if (e.type === "boolean" && t) {
        i = f(i, e.className);
        continue;
      }
    }
  }
  return r.className = f(i, o.className), r.style = v(u, o.style), r;
}
const l = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], E = { m: { type: "enum | string", values: l, responsive: !0, className: "rt-r-m", customProperties: ["--m"] }, mx: { type: "enum | string", values: l, responsive: !0, className: "rt-r-mx", customProperties: ["--ml", "--mr"] }, my: { type: "enum | string", values: l, responsive: !0, className: "rt-r-my", customProperties: ["--mt", "--mb"] }, mt: { type: "enum | string", values: l, responsive: !0, className: "rt-r-mt", customProperties: ["--mt"] }, mr: { type: "enum | string", values: l, responsive: !0, className: "rt-r-mr", customProperties: ["--mr"] }, mb: { type: "enum | string", values: l, responsive: !0, className: "rt-r-mb", customProperties: ["--mb"] }, ml: { type: "enum | string", values: l, responsive: !0, className: "rt-r-ml", customProperties: ["--ml"] } }, j = ["none", "small", "medium", "large", "full"], R = { radius: { type: "enum", values: j, default: void 0 } };
export {
  P as R,
  A as a,
  E as b,
  O as c,
  b as g,
  v as l,
  C as o,
  R as r,
  W as s,
  k as t,
  z as v
};
