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