import { ref as p, createElementBlock as n, openBlock as s, createElementVNode as t, toDisplayString as c, Fragment as m, renderList as _, withDirectives as h, vModelCheckbox as v } from "vue";
/* empty css                 */
import f from "../../../_virtual/_plugin-vue_export-helper.js";
const g = { class: "participant-list" }, k = ["id", "value"], y = ["for"], b = {
  __name: "SelectUser2",
  props: {
    users: {
      type: Array,
      required: !0
    },
    title: {
      type: String,
      required: !0
    }
  },
  emits: ["change"],
  setup(o, { emit: i }) {
    const r = p([]), a = i, u = () => {
      console.log("check"), a("change", { selectedUsers: r.value });
    };
    return (x, l) => (s(), n("div", null, [
      t("h2", null, c(o.title), 1),
      t("div", g, [
        (s(!0), n(m, null, _(o.users, (e) => (s(), n("div", {
          key: e.userId,
          class: "participant-item"
        }, [
          h(t("input", {
            id: e.userId,
            "onUpdate:modelValue": l[0] || (l[0] = (d) => r.value = d),
            type: "checkbox",
            value: e.userId,
            onChange: u
          }, null, 40, k), [
            [v, r.value]
          ]),
          t("label", {
            for: e.userId
          }, c(e.name || "unknown username"), 9, y)
        ]))), 128))
      ])
    ]));
  }
}, C = /* @__PURE__ */ f(b, [["__scopeId", "data-v-368cbcb0"]]);
export {
  C as default
};
