import { defineComponent as _, computed as b, openBlock as l, createElementBlock as c, normalizeClass as p, unref as a, createVNode as E, withCtx as v, Fragment as k, renderList as N, createBlock as h, createElementVNode as d, toDisplayString as A, createCommentVNode as C } from "vue";
import { useNamespace as g, ElSpace as i } from "element-plus";
const S = /* @__PURE__ */ _({
  __name: "enum",
  props: {
    valueEnum: {
      type: Array,
      default() {
        return [];
      }
    },
    value: [String, Number, Array]
  },
  setup(f) {
    const n = g("table-cell-state"), t = f, m = b(() => {
      if (t.value === void 0)
        return null;
      const u = t.valueEnum.map((e) => e && typeof e == "object" ? e : {
        label: e,
        value: e
      }), s = Array.isArray(t.value) ? t.value : [t.value], r = [];
      return s.forEach((e) => {
        const o = u.find((y) => y.value === e);
        o && r.push(o);
      }), r;
    });
    return (u, s) => t.value !== void 0 ? (l(), c("div", {
      key: 0,
      class: p(a(n).b())
    }, [
      E(a(i), null, {
        default: v(() => [
          (l(!0), c(k, null, N(m.value, (r, e) => (l(), h(a(i), {
            key: e,
            size: [0, 0]
          }, {
            default: v(() => [
              d("div", {
                class: p([a(n).e("dot"), r.status ? `is-${r.status}` : ""])
              }, null, 2),
              d("span", null, A(r.label), 1)
            ]),
            _: 2
          }, 1024))), 128))
        ]),
        _: 1
      })
    ], 2)) : C("", !0);
  }
});
export {
  S as default
};
