import { defineComponent as x, useUser as b, computed as c, ref as g, useUserPosts as k, openBlock as t, createElementBlock as s, createBaseVNode as u, toDisplayString as h, createVNode as o, unref as i, withCtx as d, TransitionGroup as y, Fragment as P, renderList as B, createCommentVNode as C, Transition as N } from "./composables-Ci32s3jE.js";
import { PostReactionTabs as R } from "./components.js";
const T = { class: "flex flex-col" }, U = { class: "text-xl font-bold mb-2" }, V = { class: "flex flex-col gap-4" }, L = {
  key: 0,
  class: "flex flex-col bg-light-800 dark-bg-dark-200 rounded-2xl gap-4"
}, D = /* @__PURE__ */ x({
  __name: "AccountReactions",
  props: {
    pub: {
      default: "",
      type: String
    }
  },
  emits: ["post"],
  setup(p, { emit: M }) {
    const n = p, { user: f } = b(), m = c(() => n.pub == f.pub), e = g(), r = k(n.pub), _ = c(() => r[e.value] || []);
    return (S, a) => (t(), s("div", T, [
      u("div", U, h(m.value ? "My " : "") + " Posts", 1),
      u("div", V, [
        o(i(R), {
          current: e.value,
          "onUpdate:current": a[0] || (a[0] = (l) => e.value = l),
          reactions: i(r)
        }, null, 8, ["current", "reactions"]),
        o(N, { name: "fade" }, {
          default: d(() => [
            e.value ? (t(), s("div", L, [
              o(y, { name: "fade" }, {
                default: d(() => [
                  (t(!0), s(P, null, B(_.value, (l, v) => (t(), s("div", {
                    class: "p-0 relative",
                    key: v
                  }))), 128))
                ]),
                _: 1
              })
            ])) : C("", !0)
          ]),
          _: 1
        })
      ])
    ]));
  }
});
export {
  D as default
};
//# sourceMappingURL=AccountReactions-rMAiwgcq.js.map
