import { cx as e } from "../../../theme/tools.js";
import { base as t, linesContainer as n, variant as r } from "./skeleton.css.js";
import { defaultHeightForVariant as i, toCssSize as a } from "./Skeleton.helpers.js";
import { jsx as o } from "react/jsx-runtime";
//#region src/backoffice/atoms/skeleton/Skeleton.tsx
var s = ({ variant: s = "text", width: c, height: l, className: u, style: d, lines: f }) => {
	let p = a(l) ?? i(s), m = a(c), h = {
		width: m,
		height: p,
		...d
	};
	if (!(s === "text" && (f ?? 1) > 1)) return /* @__PURE__ */ o("span", {
		"aria-hidden": "true",
		className: e(t, r[s], u),
		style: h
	});
	let g = Math.max(1, f ?? 1);
	return /* @__PURE__ */ o("span", {
		"aria-hidden": "true",
		className: n,
		children: Array.from({ length: g }, (n, i) => {
			let a = i === g - 1, s = m ?? "100%";
			return a && (s = "70%"), /* @__PURE__ */ o("span", {
				className: e(t, r.text, u),
				style: {
					...h,
					width: s,
					height: p
				}
			}, `line-${i}`);
		})
	});
};
//#endregion
export { s as Skeleton, s as default };

//# sourceMappingURL=Skeleton.js.map