import e from "../PlTooltip/PlTooltip.js";
import "../PlTooltip/index.js";
import t from "../PlCheckbox/PlCheckboxBase.js";
import './pl-checkbox-group.css';/* empty css                  */
import { Fragment as n, createBlock as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderList as d, renderSlot as f, toDisplayString as p, unref as m, useSlots as h, withCtx as g, withModifiers as _ } from "vue";
var v = { key: 0 }, y = ["onClick"], b = /* @__PURE__ */ c({
	name: "PlCheckboxGroup",
	props: {
		modelValue: {},
		label: {},
		options: {},
		disabled: { type: Boolean }
	},
	emits: ["update:modelValue"],
	setup(c, { emit: b }) {
		let x = h(), S = b, C = c, w = (e) => C.modelValue.includes(e), T = (e) => {
			let t = C.modelValue ?? [];
			S("update:modelValue", w(e) ? t.filter((t) => t !== e) : [...t, e]);
		};
		return (h, b) => (u(), a("div", { class: l(["pl-checkbox-group", { disabled: c.disabled }]) }, [c.label ? (u(), a("label", v, [o("span", null, p(c.label), 1), m(x).tooltip ? (u(), r(m(e), {
			key: 0,
			class: "info",
			position: "top"
		}, {
			tooltip: g(() => [f(h.$slots, "tooltip")]),
			_: 3
		})) : i("", !0)])) : i("", !0), (u(!0), a(n, null, d(c.options.map((e) => ({
			label: "label" in e ? e.label : e.text,
			value: e.value
		})), (e, n) => (u(), a("div", { key: n }, [s(t, {
			disabled: c.disabled,
			label: e.label,
			"model-value": w(e.value),
			"onUpdate:modelValue": () => T(e.value)
		}, null, 8, [
			"disabled",
			"label",
			"model-value",
			"onUpdate:modelValue"
		]), o("label", { onClick: _(() => T(e.value), ["stop"]) }, p(e.label), 9, y)]))), 128))], 2));
	}
});
export { b as default };

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