"use client";
import { carouselAnatomy } from "./carousel.anatomy.js";
import { ark } from "../factory.js";
import { useCarouselContext } from "./use-carousel-context.js";
import { forwardRef, useMemo } from "react";
import { jsx } from "react/jsx-runtime";
//#region src/components/carousel/carousel-progress-text.tsx
var parts = carouselAnatomy.build();
var CarouselProgressText = forwardRef((props, ref) => {
	const carousel = useCarouselContext();
	const progressText = useMemo(() => {
		return `${carousel.page + 1} / ${carousel.pageSnapPoints.length}`;
	}, [carousel.page, carousel.pageSnapPoints.length]);
	return /* @__PURE__ */ jsx(ark.span, {
		ref,
		...parts.progressText.attrs,
		...props,
		children: props.children || progressText
	});
});
CarouselProgressText.displayName = "CarouselProgressText";
//#endregion
export { CarouselProgressText };
