import { defineComponent as b, toRef as g, computed as k, resolveComponent as o, openBlock as v, createElementBlock as h, createElementVNode as t, createVNode as n, toDisplayString as d, unref as s } from "vue";
import { useAccount as x, usePrivateChat as C } from "./composables-5f691338.js";
const S = { class: "m-0 flex flex-col" }, D = { class: "flex-0 p-4 flex flex-wrap items-center" }, q = { class: "text-lg font-bold p-2" }, A = { class: "text-lg" }, B = { class: "flex-0 bg-light-900 dark-bg-dark-600 p-4" }, R = /* @__PURE__ */ b({
  __name: "ChatPrivate",
  props: {
    pub: {
      default: "OKrDaDeD8VeA27d673RqlodSnebnaDq6Ci23Ys_ABWE.q8fI2lkxO46R8TMjeUeAf7I0yBS5mdH_Cb9_285Wkqk",
      type: String
    }
  },
  emits: ["user"],
  setup(a) {
    const c = a, { account: l } = x(g(c, "pub")), r = k(() => C(c.pub));
    return (u, e) => {
      var i;
      const m = o("account-avatar"), _ = o("chat-messages"), f = o("chat-input");
      return v(), h("div", S, [
        t("div", D, [
          n(m, {
            pub: a.pub,
            onClick: e[0] || (e[0] = (p) => u.$emit("user"))
          }, null, 8, ["pub"]),
          t("div", q, d((i = s(l).profile) == null ? void 0 : i.name), 1),
          t("div", A, d(s(l).lastSeen), 1)
        ]),
        n(_, {
          class: "bg-dark-50 dark-bg-dark-400",
          messages: s(r).sorted
        }, null, 8, ["messages"]),
        t("div", B, [
          n(f, {
            onSubmit: e[1] || (e[1] = (p) => s(r).send(p))
          })
        ])
      ]);
    };
  }
});
export {
  R as default
};
//# sourceMappingURL=ChatPrivate-3247897a.js.map
