import { reactive as u, computed as a, createElementBlock as m, createCommentVNode as p, openBlock as i, toDisplayString as l } from "vue";
import { useGun as d, currentRoom as g } from "./composables-BAZQlC3e.js";
const f = {
  key: 0,
  class: "m-1 flex items-center items-center px-2 py-1 bg-light-700 dark-bg-dark-50 rounded-lg"
}, b = {
  __name: "PostLink",
  props: {
    hash: {
      type: String,
      default: ""
    }
  },
  setup(s) {
    const r = s, c = d(), t = u({});
    c.user(g.pub).get("posts").map().once((o, e) => {
      e.indexOf(r.hash) == 0 && o ? t[e.substring(45, 87)] = o : delete t[e];
    });
    const n = a(() => Object.keys(t).length);
    return (o, e) => n.value > 0 ? (i(), m("button", f, l(n.value), 1)) : p("", !0);
  }
};
export {
  b as default
};
//# sourceMappingURL=PostLink-BSIfSDk7.js.map
