'use client';


import { jsx } from "react/jsx-runtime";
import { useIntlayer } from "react-intlayer";
import { useNumber } from "react-intlayer/format";

//#region src/components/Pagination/ShowingResultsNumberItems.tsx
const ShowingResultsNumberItems = ({ currentPage, pageSize, totalItems }) => {
	const { showingResults } = useIntlayer("pagination");
	const number = useNumber();
	const safePageSize = Math.max(1, pageSize);
	const totalPages = Math.max(1, Math.ceil(totalItems / safePageSize));
	const page = Math.min(Math.max(1, currentPage), totalPages);
	const start = totalItems === 0 ? 0 : Math.min((page - 1) * safePageSize + 1, totalItems);
	const end = totalItems === 0 ? 0 : Math.min(page * safePageSize, totalItems);
	return /* @__PURE__ */ jsx("div", {
		className: "text-neutral-600 text-sm dark:text-neutral-400",
		children: showingResults({
			start: number(start),
			end: number(end),
			total: number(totalItems)
		})
	});
};

//#endregion
export { ShowingResultsNumberItems };
//# sourceMappingURL=ShowingResultsNumberItems.mjs.map