import { useRelay as p, onMounted as f, openBlock as l, createElementBlock as n, createBaseVNode as e, unref as o, Fragment as h, renderList as v, normalizeClass as m, normalizeStyle as x, toDisplayString as _, useRelays as y, pushScopeId as g, popScopeId as R } from "./composables-108ad332.js";
import { _export_sfc as b } from "./_plugin-vue_export-helper-6a641814.js";
const r = (s) => (g("data-v-23604354"), s = s(), R(), s), S = { class: "flex flex-col" }, C = { class: "flex items-center" }, I = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "text-lg text-left" }, "Volunteer relay peers:", -1)), L = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "flex-auto" }, null, -1)), k = /* @__PURE__ */ r(() => /* @__PURE__ */ e("div", { class: "i-la-redo-alt" }, null, -1)), B = [
  k
], G = { class: "flex flex-col font-normal items-start" }, w = ["onClick"], z = { class: "flex-1 underline" }, P = { class: "font-bold" }, V = {
  __name: "GunRelayList",
  setup(s) {
    const { relay: i, setPeer: d, resetPeer: $ } = p(), { relays: u, loadRelays: a } = y();
    return f(() => {
      a();
    }), (D, c) => (l(), n("div", S, [
      e("div", C, [
        I,
        L,
        e("button", {
          class: "button m-1",
          onClick: c[0] || (c[0] = (t) => o(a)())
        }, B)
      ]),
      e("ul", G, [
        (l(!0), n(h, null, v(o(u), (t) => (l(), n("li", {
          class: m(["flex w-full text-left p-1 hover-bg-light-500 cursor-pointer hover-dark-bg-dark-600", { active: t.url == o(i).peer }]),
          key: t.host,
          style: x({ order: t.ping }),
          onClick: (E) => o(d)(t.url)
        }, [
          e("div", z, _(t.host), 1),
          e("div", P, _(t.ping) + " ms", 1)
        ], 14, w))), 128))
      ])
    ]));
  }
}, N = /* @__PURE__ */ b(V, [["__scopeId", "data-v-23604354"]]);
export {
  N as default
};
//# sourceMappingURL=GunRelayList-bf7d5c37.js.map
