import { I18nController as e } from "../internal/controllers/i18n.controller.js";
import { appendRootNodeStyle as t } from "../internal/utils/dom.js";
import { attachInternals as n } from "../internal/utils/a11y.js";
import { TypeClosableController as r } from "../internal/controllers/type-closable.controller.js";
import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
import { 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 { IconButton as d } from "../icon-button/icon-button2.js";
import f from "./alert.global.js";
import p from "./alert.js";
import { LitElement as m, html as h } from "lit";
import { property as g } from "lit/decorators/property.js";
import { queryAssignedElements as _ } from "lit/decorators/query-assigned-elements.js";
//#region src/alert/alert.ts
var v = class extends m {
	constructor(...t) {
		super(...t), this.closable = !1, this.#e = new r(this), this.#t = new e(this), this.i18n = this.#t.i18n;
	}
	static {
		this.styles = s([
			p,
			a,
			o
		]);
	}
	static {
		this.metadata = {
			tag: "nve-alert",
			version: "2.0.2"
		};
	}
	static {
		this.elementDefinitions = {
			[u.metadata.tag]: u,
			[d.metadata.tag]: d
		};
	}
	#e;
	#t;
	render() {
		return h`<div internal-host @slotchange="${() => this.requestUpdate()}"><slot name="icon"><nve-icon part="icon" role="img" .name="${c[this.status] ?? c[""]}" aria-label="${(this.status ? this.i18n[this.status] : void 0) ?? this.i18n.information ?? "information"}"></nve-icon></slot><slot name="prefix" ?hidden="${!this.prefixItems.length}"></slot><slot></slot><slot name="actions" ?hidden="${!this.actionItems.length}"></slot>${this.closable ? h`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" @click="${() => this.#e.close()}" container="flat" icon-name="cancel" size="sm" .ariaLabel="${this.i18n.close}"></nve-icon-button>` : ""}</div><slot name="content" part="_content"></slot>`;
	}
	connectedCallback() {
		super.connectedCallback(), n(this), t(this, f), this._internals.role = "alert";
	}
};
l([g({
	type: String,
	reflect: !0
})], v.prototype, "status", void 0), l([g({ type: Boolean })], v.prototype, "closable", void 0), l([g({ type: Object })], v.prototype, "i18n", void 0), l([_({
	slot: "prefix",
	flatten: !0
})], v.prototype, "prefixItems", void 0), l([_({
	slot: "actions",
	flatten: !0
})], v.prototype, "actionItems", void 0), v = l([i()], v);
//#endregion
export { v as Alert };

//# sourceMappingURL=alert2.js.map