import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { useStyleConfig } from "../core/theme.js";
import { vui } from "../core/vui.js";
import box_default from "../box/box.js";
import "../box/index.js";
import icon_default from "../icon/icon.js";
import "../icon/index.js";
import t_default from "../t/t.js";
import "../t/index.js";
import button_default from "../button/button.js";
import "../button/index.js";
import "../core/index.js";
import { jsx, jsxs } from "react/jsx-runtime";

//#region src/stepIndicator/stepIndicator.tsx
const Content = ({ number, variant, size }) => {
	if (typeof number === "undefined") return null;
	if (variant === "completed") return /* @__PURE__ */ jsx(icon_default, {
		name: "uiCheck",
		size
	});
	if (variant === "error") return /* @__PURE__ */ jsx(icon_default, {
		name: "uiTimes",
		size
	});
	return /* @__PURE__ */ jsx(t_default, {
		fontSize: size === "md" ? 16 : 14,
		fontWeight: 600,
		children: number
	});
};
/**
* Implements stepper indicator **
*/
const StepIndicator = vui((props, ref) => {
	const { icon, number, className, size = "md", variant = "active", ...rest } = props;
	const styles = useStyleConfig("StepIndicator", props);
	return icon ? /* @__PURE__ */ jsx(button_default, {
		className: cs("vui-stepIndicator", "vui-stepIndicatorIcon", className),
		icon,
		ref,
		...styles.icon,
		...rest,
		isRound: true,
		minW: "auto",
		pointerEvents: "none",
		size
	}) : /* @__PURE__ */ jsxs(button_default, {
		className: cs("vui-stepIndicator", "vui-stepIndicatorNumber", className),
		ref,
		...styles.button,
		...rest,
		isRound: true,
		minW: "auto",
		outline: "6px solid white",
		pointerEvents: "none",
		position: "relative",
		size,
		children: [/* @__PURE__ */ jsx(box_default, {
			mx: .5,
			position: "relative"
		}), /* @__PURE__ */ jsx(box_default, {
			mx: .5,
			position: "absolute",
			children: /* @__PURE__ */ jsx(Content, {
				number,
				size: String(size),
				variant: String(variant)
			})
		})]
	});
});
StepIndicator.displayName = "StepIndicator";

//#endregion
export { StepIndicator };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=stepIndicator.js.map