import { y } from "./index.bXWE_wTx.js";
const o$2 = { asChild: { type: "boolean" } };
const t = { width: { type: "string", className: "rt-r-w", customProperties: ["--width"], responsive: true }, minWidth: { type: "string", className: "rt-r-min-w", customProperties: ["--min-width"], responsive: true }, maxWidth: { type: "string", className: "rt-r-max-w", customProperties: ["--max-width"], responsive: true } };
const o$1 = ["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"], r$2 = { color: { type: "enum", values: o$1, default: void 0 } }, s = { color: { type: "enum", values: o$1, default: "" } };
const o = { highContrast: { type: "boolean", className: "rt-high-contrast", default: void 0 } };
const e$3 = ["initial", "xs", "sm", "md", "lg", "xl"];
function e$2(n, r2) {
  return Object.prototype.hasOwnProperty.call(n, r2);
}
function i(e2) {
  return typeof e2 == "object" && Object.keys(e2).some((s2) => e$3.includes(s2));
}
function R({ className: r2, customProperties: n, ...t2 }) {
  const p = g({ allowArbitraryValues: true, className: r2, ...t2 }), e2 = m({ customProperties: n, ...t2 });
  return [p, e2];
}
function g({ allowArbitraryValues: r2, value: n, className: t2, propValues: p, parseValue: e2 = (s2) => s2 }) {
  const s2 = [];
  if (n) {
    if (typeof n == "string" && p.includes(n)) return l$1(t2, n, e2);
    if (i(n)) {
      const i2 = n;
      for (const o2 in i2) {
        if (!e$2(i2, o2) || !e$3.includes(o2)) continue;
        const u = i2[o2];
        if (u !== void 0) {
          if (p.includes(u)) {
            const f = l$1(t2, u, e2), v2 = o2 === "initial" ? f : `${o2}:${f}`;
            s2.push(v2);
          } else if (r2) {
            const f = o2 === "initial" ? t2 : `${o2}:${t2}`;
            s2.push(f);
          }
        }
      }
      return s2.join(" ");
    }
    if (r2) return t2;
  }
}
function l$1(r2, n, t2) {
  const p = r2 ? "-" : "", e2 = t2(n), s2 = e2?.startsWith("-"), i2 = s2 ? "-" : "", o2 = s2 ? e2?.substring(1) : e2;
  return `${i2}${r2}${p}${o2}`;
}
function m({ customProperties: r2, value: n, propValues: t2, parseValue: p = (e2) => e2 }) {
  let e2 = {};
  if (!(!n || typeof n == "string" && t2.includes(n))) {
    if (typeof n == "string" && (e2 = Object.fromEntries(r2.map((s2) => [s2, n]))), i(n)) {
      const s2 = n;
      for (const i2 in s2) {
        if (!e$2(s2, i2) || !e$3.includes(i2)) continue;
        const o2 = s2[i2];
        if (!t2.includes(o2)) for (const u of r2) e2 = { [i2 === "initial" ? u : `${u}-${i2}`]: o2, ...e2 };
      }
    }
    for (const s2 in e2) {
      const i2 = e2[s2];
      i2 !== void 0 && (e2[s2] = p(i2));
    }
    return e2;
  }
}
function l(...t2) {
  let e2 = {};
  for (const n of t2) n && (e2 = { ...e2, ...n });
  return Object.keys(e2).length ? e2 : void 0;
}
function N(...r2) {
  return Object.assign({}, ...r2);
}
function v(r2, ...m2) {
  let t2, l$12;
  const a = { ...r2 }, f = N(...m2);
  for (const n in f) {
    let s2 = a[n];
    const e2 = f[n];
    if (e2.default !== void 0 && s2 === void 0 && (s2 = e2.default), e2.type === "enum" && ![e2.default, ...e2.values].includes(s2) && !i(s2) && (s2 = e2.default), a[n] = s2, "className" in e2 && e2.className) {
      delete a[n];
      const u = "responsive" in e2;
      if (!s2 || i(s2) && !u) continue;
      if (i(s2) && (e2.default !== void 0 && s2.initial === void 0 && (s2.initial = e2.default), e2.type === "enum" && ([e2.default, ...e2.values].includes(s2.initial) || (s2.initial = e2.default))), e2.type === "enum") {
        const i2 = g({ allowArbitraryValues: false, value: s2, className: e2.className, propValues: e2.values, parseValue: e2.parseValue });
        t2 = y(t2, i2);
        continue;
      }
      if (e2.type === "string" || e2.type === "enum | string") {
        const i2 = e2.type === "string" ? [] : e2.values, [d, y$1] = R({ className: e2.className, customProperties: e2.customProperties, propValues: i2, parseValue: e2.parseValue, value: s2 });
        l$12 = l(l$12, y$1), t2 = y(t2, d);
        continue;
      }
      if (e2.type === "boolean" && s2) {
        t2 = y(t2, e2.className);
        continue;
      }
    }
  }
  return a.className = y(t2, r2.className), a.style = l(l$12, r2.style), a;
}
const e$1 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], r$1 = { m: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-m", customProperties: ["--m"] }, mx: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-mx", customProperties: ["--ml", "--mr"] }, my: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-my", customProperties: ["--mt", "--mb"] }, mt: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-mt", customProperties: ["--mt"] }, mr: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-mr", customProperties: ["--mr"] }, mb: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-mb", customProperties: ["--mb"] }, ml: { type: "enum | string", values: e$1, responsive: true, className: "rt-r-ml", customProperties: ["--ml"] } };
const e = ["none", "small", "medium", "large", "full"], r = { radius: { type: "enum", values: e, default: void 0 } };
export {
  R,
  r$2 as a,
  r$1 as b,
  o$2 as c,
  g,
  l,
  o,
  r,
  s,
  t,
  v
};
//# sourceMappingURL=radius.prop.BtpSO2zx.js.map
