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