import { ACCENT_PALETTES as e, getTheme as t } from "../../services/theme-engine/index.js";
//#region src/components/theme/theme-preview-tile.ts
var n = "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z", r = "M12 2l4 5h-8z M12 7v15 M5 12l-2 2 2 2 M19 12l2 2-2 2 M8 22h8 M3 9c2 0 3 1 4 2 M21 9c-2 0-3 1-4 2", i = "M12 3a8 8 0 0 0-8 8v6l3 1v3h2v-3h2v3h2v-3h2v3h2v-3l3-1v-6a8 8 0 0 0-8-8z M9 12h.01 M15 12h.01", a = "M11 11m-7 0a7 7 0 1 0 14 0 7 7 0 1 0-14 0 M21 21l-4.35-4.35", o = "M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9 M13.73 21a2 2 0 0 1-3.46 0", s = "M12 2v4 M9 6h6 M10 6v4a4 4 0 0 0 8 0V6";
function c(e, t = 14) {
	let n = document.createElementNS("http://www.w3.org/2000/svg", "svg");
	n.setAttribute("width", String(t)), n.setAttribute("height", String(t)), n.setAttribute("viewBox", "0 0 24 24"), n.setAttribute("fill", "none"), n.setAttribute("stroke", "currentColor"), n.setAttribute("stroke-width", "2"), n.setAttribute("stroke-linecap", "round"), n.setAttribute("stroke-linejoin", "round");
	for (let t of e.split(/(?=M)/g)) {
		let e = t.trim();
		if (!e) continue;
		let r = document.createElementNS("http://www.w3.org/2000/svg", "path");
		r.setAttribute("d", e), n.appendChild(r);
	}
	return n;
}
var l = class {
	el;
	constructor() {
		this.el = document.createElement("div"), this.el.className = "theme-studio-preview-tile", this.render(), document.addEventListener("cm:theme-change", () => this.render());
	}
	render() {
		let l = t(), u = e[l.accent];
		this.el.dataset.mode = l.mode, this.el.innerHTML = "";
		let d = document.createElement("div");
		d.className = "theme-studio-preview-tile__head";
		let f = document.createElement("span");
		f.className = "theme-studio-preview-tile__mark", f.style.background = u.brand, f.appendChild(c(n, 12)), d.appendChild(f);
		let p = document.createElement("span");
		p.className = "theme-studio-preview-tile__title", p.textContent = "CounterMeasure", d.appendChild(p);
		let m = document.createElement("span");
		m.className = "theme-studio-preview-tile__spacer", d.appendChild(m);
		let h = document.createElement("span");
		h.className = "theme-studio-preview-tile__icon", h.appendChild(c(a, 14)), d.appendChild(h);
		let g = document.createElement("span");
		g.className = "theme-studio-preview-tile__icon", g.appendChild(c(o, 14)), d.appendChild(g), this.el.appendChild(d);
		let _ = document.createElement("div");
		_.className = "theme-studio-preview-tile__body";
		let v = document.createElement("div");
		v.className = "theme-studio-preview-tile__section";
		let y = document.createElement("div");
		y.className = "theme-studio-preview-tile__eyebrow", y.textContent = "DETECTIONS", v.appendChild(y);
		let b = [
			{
				iconPath: n,
				label: "Cobalt Strike beacon",
				pillText: "87",
				pillBg: u.soft,
				pillColor: u.brand
			},
			{
				iconPath: r,
				label: "Lateral movement (PsExec)",
				pillText: "HIGH",
				pillBg: "rgba(239,68,68,0.10)",
				pillColor: "#f87171"
			},
			{
				iconPath: i,
				label: "APT29 — kerberoasting",
				pillText: "23",
				pillBg: "rgba(255,255,255,0.06)",
				pillColor: "var(--text-3)"
			}
		];
		for (let e of b) {
			let t = document.createElement("div");
			t.className = "theme-studio-preview-tile__row", t.appendChild(c(e.iconPath, 14));
			let n = document.createElement("span");
			n.className = "theme-studio-preview-tile__row-label", n.textContent = e.label, t.appendChild(n);
			let r = document.createElement("span");
			r.className = "theme-studio-preview-tile__pill", r.style.background = e.pillBg, r.style.color = e.pillColor, r.textContent = e.pillText, t.appendChild(r), v.appendChild(t);
		}
		_.appendChild(v);
		let x = document.createElement("button");
		x.type = "button", x.className = "theme-studio-preview-tile__cta", x.style.background = u.brand, x.appendChild(c(s, 12));
		let S = document.createElement("span");
		S.textContent = "Connect source", x.appendChild(S), _.appendChild(x), this.el.appendChild(_);
	}
};
//#endregion
export { l as ThemePreviewTile };

//# sourceMappingURL=theme-preview-tile.js.map