import { injectState as e } from "./keys.js";
import { Fragment as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, defineComponent as o, openBlock as s, renderList as c, toDisplayString as l, withModifiers as u } from "vue";
var d = {
	key: 0,
	class: "command-menu"
}, f = { key: 0 }, p = ["onClick"], m = /* @__PURE__ */ o({
	__name: "RowsCommandMenu",
	setup(o) {
		let m = e(), h = n(() => m.getSelectedRows()), g = n(() => h.value.length > 0), _ = n(() => m.settings?.value.onSelectedRows ?? []), v = n(() => _.value.map((e) => ({
			label: e.label,
			cb: () => {
				e.cb(h.value), m.data.selectedRows.clear(), m.data.rows = [];
			}
		})));
		return (e, n) => g.value ? (s(), i("div", d, [
			h.value.length ? (s(), i("span", f, l(h.value.length) + " rows selected", 1)) : r("", !0),
			n[0] ||= a("hr", null, null, -1),
			(s(!0), i(t, null, c(v.value, (e, t) => (s(), i("span", {
				key: t,
				class: "command",
				onClick: u(e.cb, ["stop"])
			}, l(e.label), 9, p))), 128))
		])) : r("", !0);
	}
});
export { m as default };

//# sourceMappingURL=RowsCommandMenu.vue2.js.map