import { computed as u, reactive as p, createElementBlock as s, openBlock as i, createElementVNode as o, createCommentVNode as m, createVNode as f, unref as g, toDisplayString as a } from "vue";
import { useGun as h } from "./composables-BAZQlC3e.js";
import { RoomFeatureIcon as y } from "./components.js";
const b = ["title"], x = { class: "text-4xl" }, _ = { class: "px-1 font-bold whitespace-nowrap" }, 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 n = e, c = u(() => {
      const r = h(), t = p({});
      return r.user(n.pub).get(n.type).map().once((l, d) => {
        l && (t[d] = !0);
      }), t;
    });
    return (r, t) => (i(), s("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
    }, [
      o("div", x, [
        f(g(y), { icon: e.type }, null, 8, ["icon"])
      ]),
      o("div", _, a(e.title), 1),
      e.open ? (i(), s("div", k)) : m("", !0),
      o("div", v, a(Object.keys(c.value).length), 1)
    ], 8, b));
  }
};
export {
  D as default
};
//# sourceMappingURL=RoomFeature-DZbZpVlf.js.map
