const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_useEngineContext = require("../../../hooks/useEngineContext.js");
const require_topologyLocale = require("../topologyLocale.js");
let react = require("react");
react = require_runtime.__toESM(react);
require("./TopologyConnectionLegend.less");
//#region src/plus/pisellTopology/components/TopologyConnectionLegend.tsx
/**
* TopologyConnectionLegend - 拓扑连线类型图例（颜色 + 线型 → 连接方式）。
*
* 用 SVG 画一段实/虚线作为示意，避免 CSS 虚线在不同浏览器渲染差异。
*/
const PREFIX = "pisell-topology-connection-legend";
const 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 displayLocale = require_topologyLocale.resolveTopologyDisplayLocale(require_useEngineContext.default());
	return /* @__PURE__ */ react.default.createElement("div", { className: PREFIX }, /* @__PURE__ */ react.default.createElement("div", { className: `${PREFIX}__title` }, require_topologyLocale.getTopologyText("pisell-topology.legend.title", displayLocale)), /* @__PURE__ */ react.default.createElement("ul", { className: `${PREFIX}__list` }, ITEMS.map((it) => /* @__PURE__ */ react.default.createElement("li", {
		key: it.i18nKey,
		className: `${PREFIX}__row`
	}, /* @__PURE__ */ react.default.createElement("svg", {
		className: `${PREFIX}__line`,
		width: 28,
		height: 10,
		viewBox: "0 0 28 10",
		"aria-hidden": true
	}, /* @__PURE__ */ 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__ */ react.default.createElement("span", { className: `${PREFIX}__label` }, require_topologyLocale.getTopologyText(it.i18nKey, displayLocale))))));
}
//#endregion
exports.TopologyConnectionLegend = TopologyConnectionLegend;
