import { defineComponent as j, useAccount as A, toRef as h, useUser as B, computed as $, useBackground as P, useProjects as w, openBlock as s, createElementBlock as a, createBaseVNode as l, createVNode as n, unref as e, toDisplayString as x, createBlock as d, createCommentVNode as p, normalizeStyle as C, Fragment as y, renderList as S } from "./composables-9e873712.js";
import { AccountAvatar as D, MateButton as q, ChatPrivateCount as R, AccountPetname as V, AccountProfile as z, GiftWallets as M, MateList as N, ProjectCard as O, AccountReactions as W } from "./components.js";
const E = { class: "flex flex-col rounded-3xl overflow-hidden shadow-xl" }, H = { class: "flex flex-col ml-4 mx-4" }, I = { class: "text-2xl font-bold" }, L = { class: "mt-2" }, U = /* @__PURE__ */ l("div", { class: "flex-1" }, null, -1), F = { class: "p-4 flex flex-col" }, G = /* @__PURE__ */ l("div", { class: "text-xl font-bold p-2 mt-4" }, "Projects", -1), K = { class: "flex flex-col gap-4" }, Q = /* @__PURE__ */ j({
  __name: "AccountHome",
  props: {
    pub: { type: String, default: "OKrDaDeD8VeA27d673RqlodSnebnaDq6Ci23Ys_ABWE.q8fI2lkxO46R8TMjeUeAf7I0yBS5mdH_Cb9_285Wkqk" }
  },
  emits: ["browse", "feed", "post", "chat", "user", "project"],
  setup(t) {
    const i = t, { account: r } = A(h(i, "pub")), { user: m } = B(), g = $(() => P({ pub: i.pub, size: 600, light: 0.5, draw: "circles" })), { projects: f } = w(i.pub);
    return (c, o) => {
      var k, v;
      return s(), a("div", E, [
        l("div", {
          class: "p-4 flex items-center bg-cover border-b-6",
          style: C({ borderColor: e(r).color, ...e(g) })
        }, [
          n(e(D), {
            pub: t.pub,
            size: 120,
            onClick: o[0] || (o[0] = (u) => c.$emit("user", t.pub))
          }, null, 8, ["pub"]),
          l("div", H, [
            l("div", I, x((k = e(r).profile) == null ? void 0 : k.name), 1),
            l("div", L, x((v = e(r)) == null ? void 0 : v.lastSeen), 1)
          ]),
          U,
          n(e(q), {
            class: "m-4",
            pub: t.pub
          }, null, 8, ["pub"]),
          e(m).is ? (s(), d(e(R), {
            key: 0,
            pub: t.pub,
            onChat: o[1] || (o[1] = (u) => c.$emit("chat"))
          }, null, 8, ["pub"])) : p("", !0)
        ], 4),
        t.pub != e(m).pub ? (s(), d(e(V), {
          key: 0,
          pub: t.pub,
          style: C({ backgroundColor: e(r).color })
        }, null, 8, ["pub", "style"])) : p("", !0),
        n(e(z), {
          class: "p-4",
          pub: t.pub
        }, null, 8, ["pub"]),
        l("div", F, [
          n(e(M), { pub: t.pub }, null, 8, ["pub"]),
          n(e(N), {
            pub: t.pub,
            onBrowse: o[2] || (o[2] = (u) => c.$emit("browse", u))
          }, null, 8, ["pub"]),
          Object.keys(e(f)).length > 0 ? (s(), a(y, { key: 0 }, [
            G,
            l("div", K, [
              (s(!0), a(y, null, S(e(f), (u, b) => (s(), d(e(O), {
                key: b,
                project: u,
                path: b + "@" + t.pub,
                onClick: (T) => c.$emit("project", b + "@" + t.pub)
              }, null, 8, ["project", "path", "onClick"]))), 128))
            ]),
            n(e(W), {
              class: "m-2",
              pub: t.pub,
              onPost: o[3] || (o[3] = (u) => c.$emit("post", u))
            }, null, 8, ["pub"])
          ], 64)) : p("", !0)
        ])
      ]);
    };
  }
});
export {
  Q as default
};
//# sourceMappingURL=AccountHome-58f8101b.js.map
