import { defineComponent as b, useUser as y, computed as a, useColor as h, useAvatar as k, openBlock as g, createElementBlock as v, createVNode as x, unref as t, createBaseVNode as n, selectedUser as S } from "./composables-Ci32s3jE.js";
import { SpaceStatus as w } from "./components.js";
const N = ["opacity"], B = ["fill", "stroke"], O = ["xlink:href"], U = 1e4, z = /* @__PURE__ */ b({
  __name: "SpaceGuest",
  props: {
    pub: { type: String, default: "" },
    status: { type: String, default: "" },
    pos: { type: Object, default: () => ({ x: 0, y: 0 }) },
    mouse: { type: Object, default: () => ({ x: 0, y: 0 }) },
    pulse: { type: Number, default: 0 },
    size: { type: Number, default: 100 }
  },
  emits: ["updateStatus"],
  setup(e) {
    const s = e, { user: r } = y(), i = a(() => Date.now() - Number(s.pulse)), c = a(() => i.value > U), p = h(), u = a(() => p.hex(s.pub)), { avatar: d, blink: f } = k(() => s.pub, () => s.size);
    return (m, o) => (g(), v("g", {
      class: "guest",
      opacity: c.value ? 0.1 : 1
    }, [
      x(t(w), {
        class: "opacity-20 hover-opacity-90 transition font-mono",
        content: e.status,
        onUpdate: o[0] || (o[0] = (l) => m.$emit("updateStatus", l)),
        editable: t(r).pub == e.pub,
        "max-row-length": 30,
        "line-height": 22
      }, null, 8, ["content", "editable"]),
      n("g", {
        class: "avatar",
        onClick: o[1] || (o[1] = (l) => t(S).pub = e.pub)
      }, [
        n("circle", {
          class: "transition duration-1000 ease-out",
          style: { filter: "url(#shadowButton)" },
          r: 26,
          fill: u.value,
          "stroke-width": "8",
          "stroke-opacity": "0.5",
          stroke: t(f) ? u.value : "transparent"
        }, null, 8, B),
        n("image", {
          "xlink:href": t(d),
          x: "-25",
          y: "-25",
          height: "50",
          width: "50",
          "clip-path": "url(#mask)"
        }, null, 8, O)
      ])
    ], 8, N));
  }
});
export {
  z as default
};
//# sourceMappingURL=SpaceGuest-zI5P-Lsl.js.map
