/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
class BorderRouterStore {
  // Replaced (not mutated) on every refresh so Lit consumers passing this map as a
  // @property() detect the snapshot change via the default `===` identity compare and
  // re-render. Mutating in place would keep the same reference and silently skip updates.
  #entries = /* @__PURE__ */ new Map();
  get entries() {
    return this.#entries;
  }
  async refresh(client) {
    const list = await client.sendCommand("get_thread_border_routers", 0, {});
    const next = /* @__PURE__ */ new Map();
    for (const entry of list) {
      next.set(entry.extAddressHex.toUpperCase(), entry);
    }
    this.#entries = next;
  }
  reset() {
    this.#entries = /* @__PURE__ */ new Map();
  }
}
export {
  BorderRouterStore
};
//# sourceMappingURL=border-router-store.js.map
