import { Button as e } from "../ui/button.js";
import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "../ui/select.js";
import { jsx as o, jsxs as s } from "react/jsx-runtime";
import { ChevronLeft as c, ChevronRight as l } from "lucide-react";
//#region src/components/data-table/DataTablePagination.tsx
var u = ({ page: u, pageSize: d, totalItems: f, onPageChange: p, onPageSizeChange: m }) => {
	let h = Math.ceil(f / d), g = u * d + 1, _ = Math.min((u + 1) * d, f);
	return /* @__PURE__ */ s("div", {
		className: "mt-4 flex items-center justify-between",
		children: [
			/* @__PURE__ */ s("div", {
				className: "flex items-center space-x-2",
				children: [/* @__PURE__ */ o("span", {
					className: "text-muted-foreground text-sm",
					children: "Rows per page"
				}), /* @__PURE__ */ s(t, {
					value: d.toString(),
					onValueChange: (e) => m(parseInt(e)),
					children: [/* @__PURE__ */ o(i, {
						className: "w-24",
						children: /* @__PURE__ */ o(a, {})
					}), /* @__PURE__ */ o(n, { children: [
						5,
						10,
						25,
						50
					].map((e) => /* @__PURE__ */ o(r, {
						value: e.toString(),
						children: e
					}, e)) })]
				})]
			}),
			/* @__PURE__ */ s("div", {
				className: "text-muted-foreground text-sm",
				children: [
					g,
					"-",
					_,
					" of ",
					f,
					" items"
				]
			}),
			/* @__PURE__ */ s("div", {
				className: "flex items-center space-x-2",
				children: [
					/* @__PURE__ */ o(e, {
						variant: "outline",
						size: "sm",
						onClick: () => p(u - 1),
						disabled: u === 0,
						children: /* @__PURE__ */ o(c, { className: "h-4 w-4" })
					}),
					/* @__PURE__ */ s("span", {
						className: "text-sm",
						children: [
							"Page ",
							f === 0 ? 0 : u + 1,
							" of ",
							h
						]
					}),
					/* @__PURE__ */ o(e, {
						variant: "outline",
						size: "sm",
						onClick: () => p(u + 1),
						disabled: u >= h - 1,
						children: /* @__PURE__ */ o(l, { className: "h-4 w-4" })
					})
				]
			})
		]
	});
};
//#endregion
export { u as default };
