import { currentRoom as d, useRoom as f, useUser as g, useRoomLogo as v, openBlock as t, createElementBlock as s, createBaseVNode as u, unref as e, createBlock as _, withCtx as b, withModifiers as k, createCommentVNode as x } from "./composables-Ci32s3jE.js";
import { FormPicture as y } from "./components.js";
const h = { class: "flex flex-col relative items-center justify-center" }, R = ["src"], B = { class: "text-2xl" }, L = {
  key: 0,
  class: "i-la-camera"
}, z = {
  __name: "RoomLogo",
  props: {
    pub: { type: String, default: d.pub },
    size: { type: Number, default: 120 },
    pic: { type: Number, default: 200 }
  },
  setup(n) {
    const { room: a, updateRoomProfile: N } = f(), { user: c } = g(), r = n, { logo: i, uploadLogo: p, removeLogo: m } = v(r.pub);
    return (C, o) => (t(), s("div", h, [
      u("img", {
        src: e(i) || "https://gun-vue.js.org/media/gun-vue-logo.svg"
      }, null, 8, R),
      e(a).hosts[e(c).pub] ? (t(), _(e(y), {
        key: 0,
        class: "absolute",
        options: { picSize: r.pic, preserveRatio: !1 },
        onUpdate: o[1] || (o[1] = (l) => e(p)(l))
      }, {
        default: b(() => [
          u("div", B, [
            e(i) ? (t(), s("div", {
              key: 1,
              class: "i-la-trash-alt",
              onClick: o[0] || (o[0] = k((l) => e(m)(), ["stop", "prevent"]))
            })) : (t(), s("div", L))
          ])
        ]),
        _: 1
      }, 8, ["options"])) : x("", !0)
    ]));
  }
};
export {
  z as default
};
//# sourceMappingURL=RoomLogo-Da72nQGP.js.map
