import { y as f } from "./index.DaRbhbpm.js";
const x = { asChild: { type: "boolean" } }, 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"], k = { color: { type: "enum", values: g, default: void 0 } }, A = { 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 b(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 V({ className: o, customProperties: s, ...i }) {
  const l = N({ allowArbitraryValues: !0, className: o, ...i }), t = h({ customProperties: s, ...i });
  return [l, t];
}
function N({ allowArbitraryValues: o, value: s, className: i, propValues: l, parseValue: t = (n) => n }) {
  const n = [];
  if (s) {
    if (typeof s == "string" && l.includes(s)) return y(i, s, t);
    if (p(s)) {
      const a = s;
      for (const r in a) {
        if (!b(a, r) || !d.includes(r)) continue;
        const e = a[r];
        if (e !== void 0) {
          if (l.includes(e)) {
            const c = y(i, e, t), m = r === "initial" ? c : `${r}:${c}`;
            n.push(m);
          } else if (o) {
            const c = r === "initial" ? i : `${r}:${i}`;
            n.push(c);
          }
        }
      }
      return n.join(" ");
    }
    if (o) return i;
  }
}
function y(o, s, i) {
  const l = o ? "-" : "", t = i(s), n = t == null ? void 0 : t.startsWith("-"), a = n ? "-" : "", r = n ? t == null ? void 0 : t.substring(1) : t;
  return `${a}${o}${l}${r}`;
}
function h({ customProperties: o, value: s, propValues: i, parseValue: l = (t) => t }) {
  let t = {};
  if (!(!s || typeof s == "string" && i.includes(s))) {
    if (typeof s == "string" && (t = Object.fromEntries(o.map((n) => [n, s]))), p(s)) {
      const n = s;
      for (const a in n) {
        if (!b(n, a) || !d.includes(a)) continue;
        const r = n[a];
        if (!i.includes(r)) for (const e of o) t = { [a === "initial" ? e : `${e}-${a}`]: r, ...t };
      }
    }
    for (const n in t) {
      const a = t[n];
      a !== void 0 && (t[n] = l(a));
    }
    return t;
  }
}
function v(...o) {
  let s = {};
  for (const i of o) i && (s = { ...s, ...i });
  return Object.keys(s).length ? s : void 0;
}
function j(...o) {
  return Object.assign({}, ...o);
}
function z(o, ...s) {
  let i, l;
  const t = { ...o }, n = j(...s);
  for (const a in n) {
    let r = t[a];
    const e = n[a];
    if (e.default !== void 0 && r === void 0 && (r = e.default), e.type === "enum" && ![e.default, ...e.values].includes(r) && !p(r) && (r = e.default), t[a] = r, "className" in e && e.className) {
      delete t[a];
      const c = "responsive" in e;
      if (!r || p(r) && !c) continue;
      if (p(r) && (e.default !== void 0 && r.initial === void 0 && (r.initial = e.default), e.type === "enum" && ([e.default, ...e.values].includes(r.initial) || (r.initial = e.default))), e.type === "enum") {
        const m = N({ allowArbitraryValues: !1, value: r, 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, [$, P] = V({ className: e.className, customProperties: e.customProperties, propValues: m, parseValue: e.parseValue, value: r });
        l = v(l, P), i = f(i, $);
        continue;
      }
      if (e.type === "boolean" && r) {
        i = f(i, e.className);
        continue;
      }
    }
  }
  return t.className = f(i, o.className), t.style = v(l, o.style), t;
}
const u = ["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: u, responsive: !0, className: "rt-r-m", customProperties: ["--m"] }, mx: { type: "enum | string", values: u, responsive: !0, className: "rt-r-mx", customProperties: ["--ml", "--mr"] }, my: { type: "enum | string", values: u, responsive: !0, className: "rt-r-my", customProperties: ["--mt", "--mb"] }, mt: { type: "enum | string", values: u, responsive: !0, className: "rt-r-mt", customProperties: ["--mt"] }, mr: { type: "enum | string", values: u, responsive: !0, className: "rt-r-mr", customProperties: ["--mr"] }, mb: { type: "enum | string", values: u, responsive: !0, className: "rt-r-mb", customProperties: ["--mb"] }, ml: { type: "enum | string", values: u, responsive: !0, className: "rt-r-ml", customProperties: ["--ml"] } }, w = ["none", "small", "medium", "large", "full"], R = { radius: { type: "enum", values: w, default: void 0 } };
export {
  V as R,
  x as a,
  E as b,
  k as c,
  N as g,
  v as l,
  C as o,
  R as r,
  A as s,
  z as v
};
//# sourceMappingURL=radius.prop.B549yVS5.js.map
