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