import { I18nController as e } from "../internal/controllers/i18n.controller.js";
import { attachInternals as t } from "../internal/utils/a11y.js";
import { typeSSR as n } from "../internal/controllers/type-ssr.controller.js";
import { scopedRegistry as r } from "../internal/decorators/scoped-registry.js";
import { colorStateStyles as i, statusStateStyles as a, supportStateStyles as o, useStyles as s } from "../internal/styles/index.js";
import { statusIcons as c } from "../internal/types/index.js";
import { __decorate as l } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
import { Icon as u } from "../icon/icon2.js";
import d from "./badge.js";
import { LitElement as f, html as p, nothing as m } from "lit";
import { property as h } from "lit/decorators/property.js";
//#region src/badge/badge.ts
var g = class extends f {
	constructor(...t) {
		super(...t), this.#t = new e(this), this.i18n = this.#t.i18n;
	}
	static {
		this.styles = s([
			d,
			a,
			o,
			i
		]);
	}
	static {
		this.metadata = {
			tag: "nve-badge",
			version: "2.0.2"
		};
	}
	static {
		this.elementDefinitions = { [u.metadata.tag]: u };
	}
	get #e() {
		return this.status && c[this.status] === "dot" ? "sm" : "md";
	}
	#t;
	render() {
		return p`<div internal-host><slot name="prefix-icon">${this.status ? p`<nve-icon part="_icon" .name="${c[this.status] ?? ""}" .size="${this.#e}" aria-hidden="true"></nve-icon>` : m}</slot><slot @slotchange="${this.#n}"></slot><slot name="suffix-icon"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), t(this), this._internals.role = "status";
	}
	updated(e) {
		super.updated(e), this.#r();
	}
	#n() {
		this.#r(), this.#i();
	}
	#r() {
		this._internals.ariaLabel = this.textContent;
	}
	#i() {
		let e = this.shadowRoot.querySelector("slot:not([name])").assignedElements().find((e) => e.matches("nve-icon") && !e.slot);
		e && (e.slot = "prefix-icon");
	}
};
l([h({
	type: String,
	reflect: !0
})], g.prototype, "status", void 0), l([h({
	type: String,
	reflect: !0
})], g.prototype, "color", void 0), l([h({
	type: String,
	reflect: !0
})], g.prototype, "container", void 0), l([h({
	type: String,
	reflect: !0
})], g.prototype, "prominence", void 0), l([h({ type: Object })], g.prototype, "i18n", void 0), g = l([n(), r()], g);
//#endregion
export { g as Badge };

//# sourceMappingURL=badge2.js.map