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