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