/** @license MIT | @cube-dev/ui-kit v0.0.0-canary-b04eed0 | Cube Dev Team */
import { Block } from "../../Block.js";
import { InternalSpinner } from "./InternalSpinner.js";
import { tasty } from "@tenphi/tasty";
import { Fragment, jsx } from "react/jsx-runtime";

//#region src/components/status/Spin/Spin.tsx
const SpinContainer = tasty(Block, { styles: { lineHeight: "0" } });
function Spin(props) {
	const { size = "default", spinning = true, children, styles } = props;
	if (!spinning) return /* @__PURE__ */ jsx(Fragment, { children });
	return /* @__PURE__ */ jsx(SpinContainer, {
		styles,
		children: /* @__PURE__ */ jsx(InternalSpinner, { size })
	});
}

//#endregion
export { Spin };
//# sourceMappingURL=Spin.js.map