import { computed as m, createElementBlock as s, openBlock as o, normalizeStyle as f, unref as e, createElementVNode as t, createCommentVNode as b, toDisplayString as x, Fragment as g, renderList as k, createBlock as _, renderSlot as h } from "vue";
import { useRoom as v, useBackground as y, useRoomLogo as w, currentRoom as B } from "./composables-BAZQlC3e.js";
import { AccountAvatar as R } from "./components.js";
const S = { class: "p-4 font-bold text-xl flex flex-wrap items-center flex w-full" }, A = ["src"], C = { class: "text-lg" }, D = {
  class: "bg-light-200 bg-opacity-40 dark-bg-dark-700 dark-bg-opacity-40 backdrop-filter backdrop-blur-md flex flex-wrap relative flex gap-2 items-center",
  style: { flex: "1 1 140px" }
}, V = {
  __name: "RoomCard",
  props: {
    pub: {
      type: String,
      default: "OKrDaDeD8VeA27d673RqlodSnebnaDq6Ci23Ys_ABWE.q8fI2lkxO46R8TMjeUeAf7I0yBS5mdH_Cb9_285Wkqk"
    },
    authors: {
      type: Object,
      default: () => {
      }
    }
  },
  setup(u) {
    const r = u, { room: l } = v(r.pub), i = m(() => y({
      pub: r.pub,
      size: 400
    })), { logo: n } = w(r.pub);
    return (p, a) => {
      var d;
      return o(), s("div", {
        class: "rounded-xl shadow-md text-sm bg-cover cursor-pointer hover-shadow-lg transition duration-300ms filter brightness-95 hover-brightness-100 flex flex-wrap overflow-hidden",
        style: f({ ...i.value, border: e(l).pub == e(B).pub ? "2px solid currentColor" : "" })
      }, [
        t("div", S, [
          e(n) ? (o(), s("img", {
            key: 0,
            class: "h-24 rounded-xl mr-2",
            src: e(n)
          }, null, 8, A)) : b("", !0),
          t("div", C, x((d = e(l).profile) == null ? void 0 : d.name), 1),
          a[0] || (a[0] = t("div", { class: "flex-1" }, null, -1)),
          (o(!0), s(g, null, k(e(l).hosts, (q, c) => (o(), _(e(R), {
            class: "m-2",
            key: c,
            pub: c,
            size: 40
          }, null, 8, ["pub"]))), 128))
        ]),
        t("div", D, [
          h(p.$slots, "default")
        ])
      ], 4);
    };
  }
};
export {
  V as default
};
//# sourceMappingURL=RoomCard-D_vtEe71.js.map
