import { defineComponent as m, computed as s, useColor as y, ref as g, gunAvatar as c, useGun as h, openBlock as k, createElementBlock as _, createBaseVNode as i, normalizeStyle as v, unref as a } from "./composables-078fa750.js";
const x = ["opacity"], z = ["fill", "stroke"], B = ["xlink:href"], N = /* @__PURE__ */ m({
  __name: "SpaceGuest",
  props: {
    pub: { type: String, default: "" },
    pos: { type: Object, default: () => ({ x: 0, y: 0 }) },
    mouse: { type: Object, default: () => ({ x: 0, y: 0 }) },
    pulse: { type: Number, default: 0 },
    blink: { type: Boolean, default: !1 },
    size: { type: Number, default: 100 }
  },
  setup(l) {
    const e = l, p = 1e4, f = s(() => Date.now() - Number(e.pulse)), d = s(() => f.value > p), b = y(), n = s(() => b.hex(e.pub)), t = g(c({ pub: e.pub, size: e.size * 4 })), u = h();
    return u.user(e.pub).get("avatar").on((o) => {
      o ? u.get("#avatars").get(o).once((r) => {
        t.value = r;
      }) : t.value = c({ pub: e.pub, size: e.size * 4 });
    }), (o, r) => (k(), _("g", {
      class: "guest",
      opacity: a(d) ? 0.1 : 1
    }, [
      i("circle", {
        class: "transition duration-1000 ease-out",
        style: v({ filter: "url(#shadowButton)" }),
        r: 26,
        fill: a(n),
        "stroke-width": "8",
        "stroke-opacity": "0.5",
        stroke: l.blink ? a(n) : "transparent"
      }, null, 12, z),
      i("image", {
        "xlink:href": t.value,
        x: "-25",
        y: "-25",
        height: "50",
        width: "50",
        "clip-path": "url(#mask)"
      }, null, 8, B)
    ], 8, x));
  }
});
export {
  N as default
};
//# sourceMappingURL=SpaceGuest-d52074d8.js.map
