import { jsx as e, jsxs as t } from "react/jsx-runtime";
//#region src/react/threat-visuals/index.tsx
function n(e) {
	return typeof e == "string" && e.length > 0;
}
function r(e) {
	return e != null && e !== !1 && e !== "";
}
function i(...e) {
	return e.filter(n).join(" ");
}
function a(e) {
	return e ?? "cyan";
}
function o({ label: n, value: o, detail: s, trend: c, trendDirection: l = "neutral", accentColor: u = "cyan", children: d, className: f }) {
	let p = a(u);
	return /* @__PURE__ */ t("div", {
		className: i("cmm-react-stat-card", f),
		children: [
			/* @__PURE__ */ e("p", {
				className: "cmm-react-stat-card__label",
				children: n
			}),
			r(o) && /* @__PURE__ */ e("p", {
				className: i("cmm-react-stat-card__value", `cmm-react-stat-card__value--${p}`),
				children: o
			}),
			r(s) && /* @__PURE__ */ e("p", {
				className: "cmm-react-stat-card__detail",
				children: s
			}),
			r(d) && /* @__PURE__ */ e("div", {
				className: "cmm-react-stat-card__children",
				children: d
			}),
			r(c) && /* @__PURE__ */ e("span", {
				className: i("cmm-react-stat-card__trend", `cmm-react-stat-card__trend--${l}`),
				children: c
			})
		]
	});
}
function s({ percent: t, segments: n = 30, highlightIndices: r = [12, 24], className: a }) {
	let o = Math.round(Math.max(0, Math.min(100, t)) / 100 * n), s = new Set(r);
	return /* @__PURE__ */ e("div", {
		className: i("cmm-react-uptime-bar", a),
		children: Array.from({ length: n }, (t, n) => /* @__PURE__ */ e("div", { className: i("cmm-react-uptime-bar__segment", n < o && "cmm-react-uptime-bar__segment--active", s.has(n) ? "cmm-react-uptime-bar__segment--highlight" : "cmm-react-uptime-bar__segment--default") }, n))
	});
}
function c({ label: n, value: a, icon: o, tone: s = "slate", className: c }) {
	return /* @__PURE__ */ t("div", {
		className: i("cmm-react-metric-tile", `cmm-react-metric-tile--${s}`, c),
		children: [r(o) && /* @__PURE__ */ e("div", {
			className: i("cmm-react-metric-tile__icon", `cmm-react-metric-tile__icon--${s}`),
			children: o
		}), /* @__PURE__ */ t("div", {
			className: "cmm-react-metric-tile__body",
			children: [/* @__PURE__ */ e("div", {
				className: "cmm-react-metric-tile__value",
				children: a
			}), /* @__PURE__ */ e("div", {
				className: "cmm-react-metric-tile__label",
				children: n
			})]
		})]
	});
}
function l({ title: n, eyebrow: a, meta: o, icon: s, tone: c = "slate", variant: l = "stripe", size: u = "regular", className: d, children: f }) {
	return /* @__PURE__ */ t("div", {
		className: i("cmm-react-flow-node-card", `cmm-react-flow-node-card--${c}`, `cmm-react-flow-node-card--${l}`, `cmm-react-flow-node-card--${u}`, d),
		children: [
			/* @__PURE__ */ t("div", {
				className: "cmm-react-flow-node-card__header",
				children: [r(s) && /* @__PURE__ */ e("div", {
					className: i("cmm-react-flow-node-card__icon", `cmm-react-flow-node-card__icon--${c}`),
					children: s
				}), /* @__PURE__ */ t("div", {
					className: "cmm-react-flow-node-card__body",
					children: [/* @__PURE__ */ e("div", {
						className: "cmm-react-flow-node-card__title",
						children: n
					}), r(a) && /* @__PURE__ */ e("div", {
						className: "cmm-react-flow-node-card__eyebrow",
						children: a
					})]
				})]
			}),
			r(o) && /* @__PURE__ */ e("div", {
				className: "cmm-react-flow-node-card__meta",
				children: o
			}),
			r(f) && /* @__PURE__ */ e("div", {
				className: "cmm-react-flow-node-card__content",
				children: f
			})
		]
	});
}
//#endregion
export { l as FlowNodeCard, c as MetricTile, o as StatCard, s as UptimeBar };

//# sourceMappingURL=threat-visuals.js.map