import * as e from "react";
import { S as N, y as v, R as E } from "./index.D1n9HtNk.js";
import { t as x, r as S, o as R, s as C, c as h, v as d, b as g } from "./radius.prop.CaJVv35S.js";
const L = { height: { type: "string", className: "rt-r-h", customProperties: ["--height"], responsive: !0 }, minHeight: { type: "string", className: "rt-r-min-h", customProperties: ["--min-height"], responsive: !0 }, maxHeight: { type: "string", className: "rt-r-max-h", customProperties: ["--max-height"], responsive: !0 } }, j = N, i = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], z = { p: { type: "enum | string", className: "rt-r-p", customProperties: ["--p"], values: i, responsive: !0 }, px: { type: "enum | string", className: "rt-r-px", customProperties: ["--pl", "--pr"], values: i, responsive: !0 }, py: { type: "enum | string", className: "rt-r-py", customProperties: ["--pt", "--pb"], values: i, responsive: !0 }, pt: { type: "enum | string", className: "rt-r-pt", customProperties: ["--pt"], values: i, responsive: !0 }, pr: { type: "enum | string", className: "rt-r-pr", customProperties: ["--pr"], values: i, responsive: !0 }, pb: { type: "enum | string", className: "rt-r-pb", customProperties: ["--pb"], values: i, responsive: !0 }, pl: { type: "enum | string", className: "rt-r-pl", customProperties: ["--pl"], values: i, responsive: !0 } }, c = ["visible", "hidden", "clip", "scroll", "auto"], B = ["static", "relative", "absolute", "fixed", "sticky"], l = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], k = ["0", "1"], F = ["0", "1"], H = { ...z, ...x, ...L, position: { type: "enum", className: "rt-r-position", values: B, responsive: !0 }, inset: { type: "enum | string", className: "rt-r-inset", customProperties: ["--inset"], values: l, responsive: !0 }, top: { type: "enum | string", className: "rt-r-top", customProperties: ["--top"], values: l, responsive: !0 }, right: { type: "enum | string", className: "rt-r-right", customProperties: ["--right"], values: l, responsive: !0 }, bottom: { type: "enum | string", className: "rt-r-bottom", customProperties: ["--bottom"], values: l, responsive: !0 }, left: { type: "enum | string", className: "rt-r-left", customProperties: ["--left"], values: l, responsive: !0 }, overflow: { type: "enum", className: "rt-r-overflow", values: c, responsive: !0 }, overflowX: { type: "enum", className: "rt-r-ox", values: c, responsive: !0 }, overflowY: { type: "enum", className: "rt-r-oy", values: c, responsive: !0 }, flexBasis: { type: "string", className: "rt-r-fb", customProperties: ["--flex-basis"], responsive: !0 }, flexShrink: { type: "enum | string", className: "rt-r-fs", customProperties: ["--flex-shrink"], values: k, responsive: !0 }, flexGrow: { type: "enum | string", className: "rt-r-fg", customProperties: ["--flex-grow"], values: F, responsive: !0 }, gridArea: { type: "string", className: "rt-r-ga", customProperties: ["--grid-area"], responsive: !0 }, gridColumn: { type: "string", className: "rt-r-gc", customProperties: ["--grid-column"], responsive: !0 }, gridColumnStart: { type: "string", className: "rt-r-gcs", customProperties: ["--grid-column-start"], responsive: !0 }, gridColumnEnd: { type: "string", className: "rt-r-gce", customProperties: ["--grid-column-end"], responsive: !0 }, gridRow: { type: "string", className: "rt-r-gr", customProperties: ["--grid-row"], responsive: !0 }, gridRowStart: { type: "string", className: "rt-r-grs", customProperties: ["--grid-row-start"], responsive: !0 }, gridRowEnd: { type: "string", className: "rt-r-gre", customProperties: ["--grid-row-end"], responsive: !0 } }, O = ["1", "2", "3", "4"], X = ["classic", "solid", "soft", "surface", "outline", "ghost"], y = { ...h, size: { type: "enum", className: "rt-r-size", values: O, default: "2", responsive: !0 }, variant: { type: "enum", className: "rt-variant", values: X, default: "solid" }, ...C, ...R, ...S, loading: { type: "boolean", className: "rt-loading", default: !1 } }, m = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], Y = { gap: { type: "enum | string", className: "rt-r-gap", customProperties: ["--gap"], values: m, responsive: !0 }, gapX: { type: "enum | string", className: "rt-r-cg", customProperties: ["--column-gap"], values: m, responsive: !0 }, gapY: { type: "enum | string", className: "rt-r-rg", customProperties: ["--row-gap"], values: m, responsive: !0 } }, A = ["div", "span"], G = ["none", "inline-flex", "flex"], V = ["row", "column", "row-reverse", "column-reverse"], q = ["start", "center", "end", "baseline", "stretch"], D = ["start", "center", "end", "between"], I = ["nowrap", "wrap", "wrap-reverse"], J = { as: { type: "enum", values: A, default: "div" }, ...h, display: { type: "enum", className: "rt-r-display", values: G, responsive: !0 }, direction: { type: "enum", className: "rt-r-fd", values: V, responsive: !0 }, align: { type: "enum", className: "rt-r-ai", values: q, responsive: !0 }, justify: { type: "enum", className: "rt-r-jc", values: D, parseValue: K, responsive: !0 }, wrap: { type: "enum", className: "rt-r-fw", values: I, responsive: !0 }, ...Y };
function K(s) {
  return s === "between" ? "space-between" : s;
}
const u = e.forwardRef((s, t) => {
  const { className: a, asChild: r, as: n = "div", ...o } = d(s, J, H, g);
  return e.createElement(r ? j : n, { ...o, ref: t, className: v("rt-Flex", a) });
});
u.displayName = "Flex";
const M = ["1", "2", "3"], Q = { size: { type: "enum", className: "rt-r-size", values: M, default: "2", responsive: !0 }, loading: { type: "boolean", default: !0 } }, b = e.forwardRef((s, t) => {
  const { className: a, children: r, loading: n, ...o } = d(s, Q, g);
  if (!n) return r;
  const p = e.createElement("span", { ...o, ref: t, className: v("rt-Spinner", a) }, e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }), e.createElement("span", { className: "rt-SpinnerLeaf" }));
  return r === void 0 ? p : e.createElement(u, { asChild: !0, position: "relative", align: "center", justify: "center" }, e.createElement("span", null, e.createElement("span", { "aria-hidden": !0, style: { display: "contents", visibility: "hidden" }, inert: void 0 }, r), e.createElement(u, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0" }, e.createElement("span", null, p))));
});
b.displayName = "Spinner";
const T = E;
function U(s, t) {
  if (s !== void 0) return typeof s == "string" ? t(s) : Object.fromEntries(Object.entries(s).map(([a, r]) => [a, t(r)]));
}
function se(s) {
  return s === "3" ? "3" : "2";
}
function W(s) {
  switch (s) {
    case "1":
      return "1";
    case "2":
    case "3":
      return "2";
    case "4":
      return "3";
  }
}
const Z = e.forwardRef((s, t) => {
  const { size: a = y.size.default } = s, { className: r, children: n, asChild: o, color: p, radius: P, disabled: f = s.loading, ...$ } = d(s, y, g), w = o ? N : "button";
  return e.createElement(w, { "data-disabled": f || void 0, "data-accent-color": p, "data-radius": P, ...$, ref: t, className: v("rt-reset", "rt-BaseButton", r), disabled: f }, s.loading ? e.createElement(e.Fragment, null, e.createElement("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": !0 }, n), e.createElement(T, null, n), e.createElement(u, { asChild: !0, align: "center", justify: "center", position: "absolute", inset: "0" }, e.createElement("span", null, e.createElement(b, { size: U(a, W) })))) : n);
});
Z.displayName = "BaseButton";
export {
  U as a,
  z as b,
  L as e,
  Z as n,
  se as p,
  b as s,
  J as u
};
