import * as React from "react";
import { S as Slot, y, R as Root } from "./index.NovFngrl.js";
import { t as t$2, r as r$2, o as o$1, s as s$3, c as o$2, v, b as r$3 } from "./radius.prop.DTamp0tm.js";
const e$5 = { height: { type: "string", className: "rt-r-h", customProperties: ["--height"], responsive: true }, minHeight: { type: "string", className: "rt-r-min-h", customProperties: ["--min-height"], responsive: true }, maxHeight: { type: "string", className: "rt-r-max-h", customProperties: ["--max-height"], responsive: true } };
const e$4 = Slot;
const e$3 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], p$5 = { p: { type: "enum | string", className: "rt-r-p", customProperties: ["--p"], values: e$3, responsive: true }, px: { type: "enum | string", className: "rt-r-px", customProperties: ["--pl", "--pr"], values: e$3, responsive: true }, py: { type: "enum | string", className: "rt-r-py", customProperties: ["--pt", "--pb"], values: e$3, responsive: true }, pt: { type: "enum | string", className: "rt-r-pt", customProperties: ["--pt"], values: e$3, responsive: true }, pr: { type: "enum | string", className: "rt-r-pr", customProperties: ["--pr"], values: e$3, responsive: true }, pb: { type: "enum | string", className: "rt-r-pb", customProperties: ["--pb"], values: e$3, responsive: true }, pl: { type: "enum | string", className: "rt-r-pl", customProperties: ["--pl"], values: e$3, responsive: true } };
const r$1 = ["visible", "hidden", "clip", "scroll", "auto"], i$1 = ["static", "relative", "absolute", "fixed", "sticky"], e$2 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9"], p$4 = ["0", "1"], n$2 = ["0", "1"], u$1 = { ...p$5, ...t$2, ...e$5, position: { type: "enum", className: "rt-r-position", values: i$1, responsive: true }, inset: { type: "enum | string", className: "rt-r-inset", customProperties: ["--inset"], values: e$2, responsive: true }, top: { type: "enum | string", className: "rt-r-top", customProperties: ["--top"], values: e$2, responsive: true }, right: { type: "enum | string", className: "rt-r-right", customProperties: ["--right"], values: e$2, responsive: true }, bottom: { type: "enum | string", className: "rt-r-bottom", customProperties: ["--bottom"], values: e$2, responsive: true }, left: { type: "enum | string", className: "rt-r-left", customProperties: ["--left"], values: e$2, responsive: true }, overflow: { type: "enum", className: "rt-r-overflow", values: r$1, responsive: true }, overflowX: { type: "enum", className: "rt-r-ox", values: r$1, responsive: true }, overflowY: { type: "enum", className: "rt-r-oy", values: r$1, responsive: true }, flexBasis: { type: "string", className: "rt-r-fb", customProperties: ["--flex-basis"], responsive: true }, flexShrink: { type: "enum | string", className: "rt-r-fs", customProperties: ["--flex-shrink"], values: p$4, responsive: true }, flexGrow: { type: "enum | string", className: "rt-r-fg", customProperties: ["--flex-grow"], values: n$2, responsive: true }, gridArea: { type: "string", className: "rt-r-ga", customProperties: ["--grid-area"], responsive: true }, gridColumn: { type: "string", className: "rt-r-gc", customProperties: ["--grid-column"], responsive: true }, gridColumnStart: { type: "string", className: "rt-r-gcs", customProperties: ["--grid-column-start"], responsive: true }, gridColumnEnd: { type: "string", className: "rt-r-gce", customProperties: ["--grid-column-end"], responsive: true }, gridRow: { type: "string", className: "rt-r-gr", customProperties: ["--grid-row"], responsive: true }, gridRowStart: { type: "string", className: "rt-r-grs", customProperties: ["--grid-row-start"], responsive: true }, gridRowEnd: { type: "string", className: "rt-r-gre", customProperties: ["--grid-row-end"], responsive: true } };
const t$1 = ["1", "2", "3", "4"], a$1 = ["classic", "solid", "soft", "surface", "outline", "ghost"], i = { ...o$2, size: { type: "enum", className: "rt-r-size", values: t$1, default: "2", responsive: true }, variant: { type: "enum", className: "rt-variant", values: a$1, default: "solid" }, ...s$3, ...o$1, ...r$2, loading: { type: "boolean", className: "rt-loading", default: false } };
const e$1 = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], p$3 = { gap: { type: "enum | string", className: "rt-r-gap", customProperties: ["--gap"], values: e$1, responsive: true }, gapX: { type: "enum | string", className: "rt-r-cg", customProperties: ["--column-gap"], values: e$1, responsive: true }, gapY: { type: "enum | string", className: "rt-r-rg", customProperties: ["--row-gap"], values: e$1, responsive: true } };
const t = ["div", "span"], p$2 = ["none", "inline-flex", "flex"], a = ["row", "column", "row-reverse", "column-reverse"], o = ["start", "center", "end", "baseline", "stretch"], n$1 = ["start", "center", "end", "between"], l = ["nowrap", "wrap", "wrap-reverse"], u = { as: { type: "enum", values: t, default: "div" }, ...o$2, display: { type: "enum", className: "rt-r-display", values: p$2, responsive: true }, direction: { type: "enum", className: "rt-r-fd", values: a, responsive: true }, align: { type: "enum", className: "rt-r-ai", values: o, responsive: true }, justify: { type: "enum", className: "rt-r-jc", values: n$1, parseValue: f, responsive: true }, wrap: { type: "enum", className: "rt-r-fw", values: l, responsive: true }, ...p$3 };
function f(e2) {
  return e2 === "between" ? "space-between" : e2;
}
const p$1 = React.forwardRef((r2, e2) => {
  const { className: s2, asChild: t2, as: m = "div", ...l2 } = v(r2, u, u$1, r$3);
  return React.createElement(t2 ? e$4 : m, { ...l2, ref: e2, className: y("rt-Flex", s2) });
});
p$1.displayName = "Flex";
const e = ["1", "2", "3"], s$2 = { size: { type: "enum", className: "rt-r-size", values: e, default: "2", responsive: true }, loading: { type: "boolean", default: true } };
const s$1 = React.forwardRef((i2, o2) => {
  const { className: a2, children: e2, loading: t2, ...m } = v(i2, s$2, r$3);
  if (!t2) return e2;
  const r2 = React.createElement("span", { ...m, ref: o2, className: y("rt-Spinner", a2) }, React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }), React.createElement("span", { className: "rt-SpinnerLeaf" }));
  return e2 === void 0 ? r2 : React.createElement(p$1, { asChild: true, position: "relative", align: "center", justify: "center" }, React.createElement("span", null, React.createElement("span", { "aria-hidden": true, style: { display: "contents", visibility: "hidden" }, inert: void 0 }, e2), React.createElement(p$1, { asChild: true, align: "center", justify: "center", position: "absolute", inset: "0" }, React.createElement("span", null, r2))));
});
s$1.displayName = "Spinner";
const d = Root;
function s(e2, t2) {
  if (e2 !== void 0) return typeof e2 == "string" ? t2(e2) : Object.fromEntries(Object.entries(e2).map(([n2, o2]) => [n2, t2(o2)]));
}
function p(e2) {
  return e2 === "3" ? "3" : "2";
}
function r(e2) {
  switch (e2) {
    case "1":
      return "1";
    case "2":
    case "3":
      return "2";
    case "4":
      return "3";
  }
}
const n = React.forwardRef((t2, p2) => {
  const { size: i$12 = i.size.default } = t2, { className: a2, children: e2, asChild: m, color: d$1, radius: l2, disabled: s$22 = t2.loading, ...u2 } = v(t2, i, r$3), f2 = m ? Slot : "button";
  return React.createElement(f2, { "data-disabled": s$22 || void 0, "data-accent-color": d$1, "data-radius": l2, ...u2, ref: p2, className: y("rt-reset", "rt-BaseButton", a2), disabled: s$22 }, t2.loading ? React.createElement(React.Fragment, null, React.createElement("span", { style: { display: "contents", visibility: "hidden" }, "aria-hidden": true }, e2), React.createElement(d, null, e2), React.createElement(p$1, { asChild: true, align: "center", justify: "center", position: "absolute", inset: "0" }, React.createElement("span", null, React.createElement(s$1, { size: s(i$12, r) })))) : e2);
});
n.displayName = "BaseButton";
export {
  s as a,
  p as b,
  e$5 as e,
  n,
  p$5 as p,
  s$1 as s,
  u
};
//# sourceMappingURL=base-button.dY2fIaam.js.map
