import * as React from "react";
import y from "../../../../../../../../../_virtual/index12.js";
import { Flex as p } from "./flex.js";
import { spinnerPropDefs as s$1 } from "./spinner.props.js";
import { extractProps as v } from "../helpers/extract-props.js";
import { marginPropDefs as r } from "../props/margin.props.js";
const s = React.forwardRef((i, o) => {
  const { className: a, children: e, loading: t, ...m } = v(i, s$1, r);
  if (!t) return e;
  const r$1 = React.createElement("span", { ...m, ref: o, className: y("rt-Spinner", a) }, 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 e === void 0 ? r$1 : React.createElement(p, { 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 }, e), React.createElement(p, { asChild: true, align: "center", justify: "center", position: "absolute", inset: "0" }, React.createElement("span", null, r$1))));
});
s.displayName = "Spinner";
export {
  s as Spinner
};
//# sourceMappingURL=spinner.js.map
