import e from "../PlIcon16/PlIcon16.js";
import "../PlMaskIcon16/index.js";
import t from "../PlSectionSeparator/PlSectionSeparator.js";
import "../PlSectionSeparator/index.js";
import n from "./ExpandTransition.js";
import { computed as r, createCommentVNode as i, createElementBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, inject as l, mergeModels as u, normalizeClass as d, openBlock as f, renderSlot as p, toDisplayString as m, toRef as h, unref as g, useModel as _, withCtx as v } from "vue";
import { uniqueId as y } from "@milaboratories/helpers";
var b = { class: "pl-accordion-section" }, x = /* @__PURE__ */ c({
	__name: "PlAccordionSection",
	props: /* @__PURE__ */ u({
		label: {},
		compact: { type: Boolean }
	}, {
		modelValue: { type: Boolean },
		modelModifiers: {}
	}),
	emits: ["update:modelValue"],
	setup(c) {
		let u = l("pl-accordion-model", () => h(""), !0), x = l("pl-accordion-props", () => h({ multiple: !1 }), !0), S = _(c, "modelValue"), C = y(), w = r(() => !x || x.value.multiple), T = r({
			get() {
				return w.value ? S.value : u ? u.value === C : S.value;
			},
			set(e) {
				w.value ? S.value = e : u && (u.value = u.value === C ? "" : C);
			}
		});
		return (r, l) => (f(), a("div", b, [s(g(t), {
			class: d(r.$style.separator),
			compact: c.compact,
			onClick: l[0] ||= (e) => T.value = !T.value
		}, {
			default: v(() => [s(g(e), {
				name: "chevron-right",
				class: d([{ [r.$style.down]: T.value }, r.$style.chevron])
			}, null, 8, ["class"]), o(" " + m(c.label), 1)]),
			_: 1
		}, 8, ["class", "compact"]), s(n, null, {
			default: v(() => [T.value ? (f(), a("div", {
				key: 0,
				class: d(r.$style.content)
			}, [p(r.$slots, "default")], 2)) : i("", !0)]),
			_: 3
		})]));
	}
});
export { x as default };

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