var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);

// src/plus/pisellTopology/components/TopologyConnectionLegend.tsx
var TopologyConnectionLegend_exports = {};
__export(TopologyConnectionLegend_exports, {
  TopologyConnectionLegend: () => TopologyConnectionLegend
});
module.exports = __toCommonJS(TopologyConnectionLegend_exports);
var import_react = __toESM(require("react"));
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
var import_topologyLocale = require("../topologyLocale");
var import_TopologyConnectionLegend = require("./TopologyConnectionLegend.less");
var PREFIX = "pisell-topology-connection-legend";
var ITEMS = [
  { i18nKey: "pisell-topology.legend.ethernet", color: "#94a3b8", dashed: false },
  { i18nKey: "pisell-topology.legend.usb", color: "#8b5cf6", dashed: false },
  { i18nKey: "pisell-topology.legend.bluetooth", color: "#3b82f6", dashed: true },
  { i18nKey: "pisell-topology.legend.wifi", color: "#06b6d4", dashed: true }
];
function TopologyConnectionLegend() {
  const engineCtx = (0, import_useEngineContext.default)();
  const displayLocale = (0, import_topologyLocale.resolveTopologyDisplayLocale)(engineCtx);
  return /* @__PURE__ */ import_react.default.createElement("div", { className: PREFIX }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__title` }, (0, import_topologyLocale.getTopologyText)("pisell-topology.legend.title", displayLocale)), /* @__PURE__ */ import_react.default.createElement("ul", { className: `${PREFIX}__list` }, ITEMS.map((it) => /* @__PURE__ */ import_react.default.createElement("li", { key: it.i18nKey, className: `${PREFIX}__row` }, /* @__PURE__ */ import_react.default.createElement(
    "svg",
    {
      className: `${PREFIX}__line`,
      width: 28,
      height: 10,
      viewBox: "0 0 28 10",
      "aria-hidden": true
    },
    /* @__PURE__ */ import_react.default.createElement(
      "line",
      {
        x1: 1,
        y1: 5,
        x2: 27,
        y2: 5,
        stroke: it.color,
        strokeWidth: 2,
        strokeLinecap: "round",
        strokeDasharray: it.dashed ? "4 3" : void 0
      }
    )
  ), /* @__PURE__ */ import_react.default.createElement("span", { className: `${PREFIX}__label` }, (0, import_topologyLocale.getTopologyText)(it.i18nKey, displayLocale))))));
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  TopologyConnectionLegend
});
