import { filterUndefined } from "../utils/object.js";
import { cs } from "../utils/styles.js";
import "../utils/index.js";
import { omitThemingProps, useStyleConfig } from "../core/theme.js";
import { styled } from "../core/styled.js";
import { vui } from "../core/vui.js";
import "../core/index.js";
import { Fragment, jsx } from "react/jsx-runtime";

//#region src/skeleton/skeleton.tsx
const SkeletonBase = styled.divBox`
  animation: vui-pulse 1.5s ease-in-out 0.5s infinite;
`;
/**
* Displays one or more animated skeleton elements to signify loading content.
*/
const Skeleton = vui((props, ref) => {
	const { className, repeat = 1, ...rest } = omitThemingProps(props);
	const styles = useStyleConfig("Skeleton", props);
	const arr = Array(repeat).fill(0);
	const aliasedProps = filterUndefined({ w: props.variant === "circle" ? styles.h : void 0 });
	return /* @__PURE__ */ jsx(Fragment, { children: arr.map((_, i) => /* @__PURE__ */ jsx(SkeletonBase, {
		className: cs("vui-skeleton", className),
		ref,
		...styles,
		...aliasedProps,
		...rest
	}, i)) });
});
Skeleton.displayName = "Skeleton";

//#endregion
export { Skeleton, SkeletonBase };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=skeleton.js.map