import { t as e } from "./caseConverters-DXegZoCt.js";
import { t } from "./_plugin-vue_export-helper-B3ysoDQm.js";
import { o as n } from "./enums-De8CDKZ1.js";
import { t as r } from "./sortQueryAdapters-CyYXvnDN.js";
import { t as i } from "./wt-icon-action-BBmutGsL.js";
import { Fragment as a, computed as o, createElementBlock as s, createVNode as c, guardReactiveProps as l, mergeProps as u, normalizeProps as d, openBlock as f, renderList as p, renderSlot as m, unref as h } from "vue";
//#region src/components/wt-action-bar/WtActionBarActionsOrder.js
var g = [
	n.ADD,
	n.ADD_CONTACT,
	n.COPY,
	n.DOWNLOAD_PDF,
	n.DOWNLOAD,
	n.LOGOUT,
	n.UPLOAD,
	n.COLUMNS,
	n.VARIABLES,
	n.FILTERS,
	n.REFRESH,
	n.DELETE,
	n.SORT
], _ = g, v = { class: "wt-action-bar" }, y = /*#__PURE__*/ t({
	__name: "wt-action-bar",
	props: {
		mode: {
			type: String,
			default: "table",
			validator: (e) => ["table", "section"].includes(e)
		},
		size: { type: String },
		include: {
			type: Array,
			default: () => []
		},
		exclude: {
			type: Array,
			default: () => []
		},
		"sort:order": {
			type: String,
			default: null,
			required: !1,
			validator: (e) => Object.values(r).includes(e)
		},
		disabled: {
			type: Boolean,
			default: !1
		},
		...Object.values(n).reduce((e, t) => (e[`disabled:${t}`] = {
			type: Boolean,
			default: !1
		}, e), {})
	},
	emits: [...Object.values(n).map((e) => `click:${e}`)],
	setup(t, { emit: r }) {
		let y = t, b = r, x = o(() => {
			let e = y.mode === "section" ? _ : g;
			return y.include.length ? e.filter((e) => y.include.includes(e)) : y.exclude.length ? e.filter((e) => !y.exclude.includes(e)) : e;
		}), S = (e) => {
			b(`click:${e}`);
		}, C = (e) => {
			switch (e) {
				case n.SORT: return { "sort:order": y["sort:order"] };
				default: return {};
			}
		};
		return (n, r) => (f(), s("div", v, [
			m(n.$slots, "search-bar", d(l({ size: t.size })), void 0, !0),
			m(n.$slots, "default", d(l({ size: t.size })), void 0, !0),
			(f(!0), s(a, null, p(x.value, (r) => m(n.$slots, r, d(l({
				action: r,
				size: t.size,
				onClick: () => S(r)
			})), () => [c(i, u(C(r), {
				action: r,
				disabled: y[`disabled:${h(e)(r)}`]
			}, { onClick: (e) => S(r) }), null, 16, [
				"action",
				"disabled",
				"onClick"
			])], !0)), 256))
		]));
	}
}, [["__scopeId", "data-v-affcbbbe"]]);
//#endregion
export { y as default };
