import { onMounted as p, openBlock as l, createElementBlock as n, createElementVNode as e, unref as o, Fragment as f, renderList as m, normalizeClass as h, normalizeStyle as v, toDisplayString as _, pushScopeId as x, popScopeId as y } from "vue";
import { useRelay as g, useRelays as R } from "./composables-5f691338.js";
import { _export_sfc as b } from "./_plugin-vue_export-helper-6a641814.js";
const r = (s) => (x("data-v-23604354"), s = s(), y(), 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)), G = [
  k
], w = { class: "flex flex-col font-normal items-start" }, z = ["onClick"], B = { class: "flex-1 underline" }, E = { class: "font-bold" }, P = {
  __name: "GunRelayList",
  setup(s) {
    const { relay: i, setPeer: d, resetPeer: V } = g(), { relays: u, loadRelays: c } = R();
    return p(() => {
      c();
    }), ($, a) => (l(), n("div", S, [
      e("div", C, [
        I,
        L,
        e("button", {
          class: "button m-1",
          onClick: a[0] || (a[0] = (t) => o(c)())
        }, G)
      ]),
      e("ul", w, [
        (l(!0), n(f, null, m(o(u), (t) => (l(), n("li", {
          class: h(["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: v({ order: t.ping }),
          onClick: (D) => o(d)(t.url)
        }, [
          e("div", B, _(t.host), 1),
          e("div", E, _(t.ping) + " ms", 1)
        ], 14, z))), 128))
      ])
    ]));
  }
}, j = /* @__PURE__ */ b(P, [["__scopeId", "data-v-23604354"]]);
export {
  j as default
};
//# sourceMappingURL=GunRelayList-9876753d.js.map
