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