import { Button as e } from "../ui/button.js";
import { Badge as t } from "../ui/badge.js";
import { Input as n } from "../ui/input.js";
import { jsx as r, jsxs as i } from "react/jsx-runtime";
import { Filter as a, Plus as o, Search as s, X as c } from "lucide-react";
//#region src/components/data-table/DataTableToolbar.tsx
var l = ({ searchTerm: l = "", onSearchChange: u, onFilterToggle: d, onNew: f, filterCount: p, isFilterOpen: m, newButtonLabel: h, showFilter: g, showSearch: _, children: v }) => /* @__PURE__ */ i("div", {
	className: "mb-4 flex items-center justify-between",
	children: [/* @__PURE__ */ r("div", {
		className: "flex w-full items-center justify-between",
		children: v
	}), /* @__PURE__ */ i("div", {
		className: "flex items-center gap-2",
		children: [
			_ ? /* @__PURE__ */ i("div", {
				className: "relative",
				children: [
					/* @__PURE__ */ r(s, { className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 transform" }),
					/* @__PURE__ */ r(n, {
						placeholder: "Search...",
						value: l,
						onChange: (e) => u && u(e.target.value),
						className: "w-64 pl-10"
					}),
					l && /* @__PURE__ */ r(e, {
						variant: "ghost",
						size: "sm",
						className: "absolute top-1/2 right-1 h-6 w-6 -translate-y-1/2 transform p-0",
						onClick: () => u && u(""),
						children: /* @__PURE__ */ r(c, { className: "h-3 w-3" })
					})
				]
			}) : "",
			g ? /* @__PURE__ */ i(e, {
				variant: m ? "default" : "outline",
				size: "sm",
				onClick: d,
				className: "relative",
				children: [
					/* @__PURE__ */ r(a, { className: "mr-2 h-4 w-4" }),
					"Filters",
					p > 0 && /* @__PURE__ */ r(t, {
						variant: "secondary",
						className: "ml-2 flex h-5 w-5 items-center justify-center p-0 text-xs",
						children: p
					})
				]
			}) : "",
			f && /* @__PURE__ */ i(e, {
				size: "sm",
				onClick: f,
				children: [/* @__PURE__ */ r(o, { className: "mr-2 h-4 w-4" }), h ?? "New"]
			})
		]
	})]
});
//#endregion
export { l as default };
