import { ref as k, useColor as u, useGun as x, onBeforeUnmount as w, openBlock as t, createElementBlock as o, Fragment as d, renderList as h, normalizeStyle as y, unref as n, theme as C, createBaseVNode as c, createBlock as b, createCommentVNode as _, toDisplayString as l, createVNode as g, withCtx as B, withDirectives as D, vShow as G, Transition as N } from "./composables-Ci32s3jE.js";
import { AccountAvatar as S } from "./components.js";
const V = { class: "overflow-hidden m-4 rounded-xl break-all" }, z = ["onClick"], A = { class: "item" }, I = { key: 0 }, L = { class: "font-bold" }, E = { class: "content" }, H = {
  __name: "GunGraph",
  setup(F) {
    const a = k({}), p = u("light"), m = u("deep"), v = x(), f = setInterval(() => {
      a.value = { ...v._.graph };
    }, 1e3);
    return w(() => {
      clearInterval(f);
    }), (T, U) => (t(), o("article", V, [
      (t(!0), o(d, null, h(a.value, (s, e) => (t(), o("div", {
        class: "p-2px text-sm",
        key: e,
        style: y({ backgroundColor: n(C).dark ? n(m).hex(e) : n(p).hex(e) })
      }, [
        c("div", {
          class: "flex cursor-pointer",
          onClick: (i) => s.show = !s.show
        }, [
          e[0] == "~" ? (t(), b(n(S), {
            key: 0,
            pub: e.slice(1, 88),
            size: 20
          }, null, 8, ["pub"])) : _("", !0),
          c("div", A, l(e[0] == "~" ? e.slice(88) : e), 1)
        ], 8, z),
        g(N, { name: "fade" }, {
          default: B(() => [
            s.show ? (t(), o("section", I, [
              (t(!0), o(d, null, h(s, (i, r) => D((t(), o("div", {
                class: "p-2",
                key: r
              }, [
                c("div", L, l(r), 1),
                c("div", E, l(i), 1)
              ])), [
                [G, r != "_" && r != "show"]
              ])), 128))
            ])) : _("", !0)
          ]),
          _: 2
        }, 1024)
      ], 4))), 128))
    ]));
  }
};
export {
  H as default
};
//# sourceMappingURL=GunGraph-C6ZRNpFV.js.map
