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