"use client";
"use client";
import { cn as e } from "../../../lib/utils.js";
import { t } from "../../../button-BNOmhdpM.js";
import { createPropsComparator as n } from "../utils/memo.js";
import * as r from "react";
import { jsx as i, jsxs as a } from "react/jsx-runtime";
import { ChevronRight as o } from "lucide-react";
//#region lib/components/ui/atoms/view-tools-control.tsx
function s(e, t = 0, n) {
	return n && t > 0 ? `${t}/${e}` : String(e);
}
function c({ toolsCount: n, selectedCount: r = 0, indeterminate: c, onClick: l, className: u, name: d }) {
	let f = s(n, r, c);
	return /* @__PURE__ */ a(t, {
		"aria-label": `View tools in ${d}`,
		className: e("gap-1", u),
		"data-slot": "view-tools-control",
		"data-testid": "view-tools",
		onClick: (e) => {
			e.stopPropagation(), l();
		},
		size: "sm",
		variant: "outline",
		children: [/* @__PURE__ */ a("span", {
			className: "text-xs leading-none",
			children: [f, " tools"]
		}), /* @__PURE__ */ i(o, { className: "size-3.5 transition-transform group-hover:translate-x-0.5" })]
	});
}
var l = r.memo(c, n([
	"toolsCount",
	"selectedCount",
	"indeterminate",
	"className",
	"name",
	"onClick"
]));
//#endregion
export { l as ViewToolsControl };
