import { defineComponent as _, computed as c, createElementBlock as t, openBlock as s, createCommentVNode as l, renderSlot as n, createVNode as d, toDisplayString as o, createTextVNode as f, unref as m, withCtx as u, Fragment as v, renderList as k } from "vue";
import { ae as C, af as I, _ as B } from "./install-BuMO14Rb.js";
import { E, d as S } from "./displayText-Cbh4IOfM.js";
const b = { class: "wt-display-chip-items" }, g = { key: 0 }, w = ["onClick"], F = /* @__PURE__ */ _({
  __name: "wt-display-chip-items",
  props: {
    hideFirstItem: { type: Boolean },
    useEmptySymbol: { type: Boolean },
    title: {},
    items: {}
  },
  setup(p) {
    const e = p, h = c(() => e.items?.length ? e.items[0]?.name : e.useEmptySymbol ? E : ""), i = c(() => e.items?.length ? e.hideFirstItem ? e.items : e.items.slice(1) : []);
    return (a, N) => (s(), t("div", b, [
      e.title ? (s(), t("p", g, o(p.title) + ":", 1)) : l("", !0),
      e.hideFirstItem ? l("", !0) : n(a.$slots, "first-item", { key: 1 }, () => [
        f(o(m(S)(h.value)), 1)
      ], !0),
      d(m(C), null, {
        activator: u(({ toggle: r }) => [
          n(a.$slots, "activator", { toggle: r }, () => [
            i.value.length ? (s(), t("div", {
              key: 0,
              onClick: r
            }, [
              d(m(I), null, {
                default: u(() => [
                  f(" +" + o(i.value.length), 1)
                ], void 0, !0),
                _: 1
              })
            ], 8, w)) : l("", !0)
          ], !0)
        ]),
        default: u(() => [
          n(a.$slots, "items", { items: i.value }, () => [
            (s(!0), t(v, null, k(i.value, ({ name: r, id: y }) => (s(), t("div", { key: y }, o(r), 1))), 128))
          ], !0)
        ]),
        _: 3
      })
    ]));
  }
}), V = /* @__PURE__ */ B(F, [["__scopeId", "data-v-4c67fbb7"]]);
export {
  V as default
};
