import { t as e } from "../../utils-C_mWfcFX.js";
//#region src/primitives/kbd/index.ts
var t = class {
	el;
	constructor(t) {
		this.el = document.createElement("span"), this.el.className = "cmm-kbd", t.className && this.el.classList.add(t.className), this.buildKeys(t.keys), t.container !== void 0 && e(t.container).appendChild(this.el);
	}
	setKeys(e) {
		this.el.innerHTML = "", this.buildKeys(e);
	}
	destroy() {
		this.el.remove();
	}
	buildKeys(e) {
		e.forEach((e, t) => {
			if (t > 0) {
				let e = document.createElement("span");
				e.className = "cmm-kbd__separator", e.textContent = "+", this.el.appendChild(e);
			}
			let n = document.createElement("kbd");
			n.className = "cmm-kbd__key", n.textContent = e, this.el.appendChild(n);
		});
	}
};
//#endregion
export { t as Kbd };

//# sourceMappingURL=index.js.map