import { computed as u, reactive as p, resolveComponent as m, openBlock as c, createElementBlock as i, createElementVNode as n, createVNode as f, toDisplayString as l, createCommentVNode as g, unref as _ } from "vue";
import { useGun as y } from "./composables-5f691338.js";
const b = ["title"], h = { class: "text-4xl" }, x = { class: "px-1 font-bold" }, k = {
  key: 0,
  class: "i-la-lock-open text-xs absolute top-1 right-1 opacity-30"
}, v = { class: "absolute bottom-1 right-1 text-xs opacity-30" }, D = {
  __name: "RoomFeature",
  props: {
    cert: { type: String, default: "" },
    open: { type: [Boolean, String], default: !1 },
    title: { type: String, default: "" },
    type: { type: String, default: "" },
    pub: { type: String, default: "OKrDaDeD8VeA27d673RqlodSnebnaDq6Ci23Ys_ABWE.q8fI2lkxO46R8TMjeUeAf7I0yBS5mdH_Cb9_285Wkqk" }
  },
  emits: ["browse"],
  setup(e) {
    const r = e, a = u(() => {
      const s = y(), t = p({});
      return s.user(r.pub).get(r.type).map().once((o, d) => {
        o && (t[d] = !0);
      }), t;
    });
    return (s, t) => {
      const o = m("room-feature-icon");
      return c(), i("div", {
        class: "cursor-pointer flex-1 flex flex-col items-center p-4 relative bg-light-700 dark-bg-dark-200 rounded-lg shadow-sm transition hover-shadow-lg",
        title: e.cert
      }, [
        n("div", h, [
          f(o, { icon: e.type }, null, 8, ["icon"])
        ]),
        n("div", x, l(e.title), 1),
        e.open ? (c(), i("div", k)) : g("", !0),
        n("div", v, l(Object.keys(_(a)).length), 1)
      ], 8, b);
    };
  }
};
export {
  D as default
};
//# sourceMappingURL=RoomFeature-34fbf375.js.map
