import { useRoom as p, computed as m, useBackground as f, useRoomLogo as b, openBlock as o, createElementBlock as l, createBaseVNode as t, unref as e, createCommentVNode as x, toDisplayString as g, Fragment as _, renderList as h, createBlock as k, renderSlot as v, normalizeStyle as y, currentRoom as w } from "./composables-Ci32s3jE.js";
import { AccountAvatar as B } from "./components.js";
const R = { class: "p-4 font-bold text-xl flex flex-wrap items-center flex w-full" }, S = ["src"], A = { class: "text-lg" }, C = /* @__PURE__ */ t("div", { class: "flex-1" }, null, -1), 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" }
}, j = {
  __name: "RoomCard",
  props: {
    pub: {
      type: String,
      default: "OKrDaDeD8VeA27d673RqlodSnebnaDq6Ci23Ys_ABWE.q8fI2lkxO46R8TMjeUeAf7I0yBS5mdH_Cb9_285Wkqk"
    },
    authors: {
      type: Object,
      default: () => {
      }
    }
  },
  setup(d) {
    const r = d, { room: s } = p(r.pub), u = m(() => f({
      pub: r.pub,
      size: 400
    })), { logo: n } = b(r.pub);
    return (i, q) => {
      var a;
      return o(), l("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: y({ ...u.value, border: e(s).pub == e(w).pub ? "2px solid currentColor" : "" })
      }, [
        t("div", R, [
          e(n) ? (o(), l("img", {
            key: 0,
            class: "h-24 rounded-xl mr-2",
            src: e(n)
          }, null, 8, S)) : x("", !0),
          t("div", A, g((a = e(s).profile) == null ? void 0 : a.name), 1),
          C,
          (o(!0), l(_, null, h(e(s).hosts, (z, c) => (o(), k(e(B), {
            class: "m-2",
            key: c,
            pub: c,
            size: 40
          }, null, 8, ["pub"]))), 128))
        ]),
        t("div", D, [
          v(i.$slots, "default")
        ])
      ], 4);
    };
  }
};
export {
  j as default
};
//# sourceMappingURL=RoomCard-Bb7sfX6F.js.map
