import { audit as e } from "../internal/controllers/audit.controller.js";
import { I18nController as t } from "../internal/controllers/i18n.controller.js";
import { appendRootNodeStyle as n } from "../internal/utils/dom.js";
import { attachInternals as r } from "../internal/utils/a11y.js";
import { TypeNativePopoverController as i } from "../internal/controllers/type-native-popover.controller.js";
import { scopedRegistry as a } from "../internal/decorators/scoped-registry.js";
import { useStyles as o } from "../internal/styles/index.js";
import { popoverStyles as s } from "../internal/styles/popover2.js";
import { __decorate as c } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
import { IconButton as l } from "../icon-button/icon-button2.js";
import u from "./dialog.global.js";
import d from "./dialog.js";
import { LitElement as f, html as p } from "lit";
import { property as m } from "lit/decorators/property.js";
//#region src/dialog/dialog.ts
var h = class extends f {
	constructor(...e) {
		super(...e), this.position = "center", this.alignment = "center", this.anchor = globalThis.document?.body, this.#e = new t(this), this.i18n = this.#e.i18n, this.typeNativePopoverController = new i(this);
	}
	#e;
	get popoverType() {
		return this.modal ? "auto" : "manual";
	}
	get popoverDismissible() {
		return !!this.closable;
	}
	static {
		this.styles = o([s, d]);
	}
	static {
		this.metadata = {
			tag: "nve-dialog",
			version: "2.0.2"
		};
	}
	static {
		this.elementDefinitions = { [l.metadata.tag]: l };
	}
	render() {
		return p`<div internal-host part="_host"><div class="header">${this.closable ? p`<nve-icon-button part="close-button icon-button" exportparts="icon:icon-button-icon" size="sm" @click="${this.hidePopover}" icon-name="cancel" .ariaLabel="${this.i18n.close}"></nve-icon-button>` : ""}<slot name="header"></slot></div><div class="content" part="_content"><slot></slot></div><slot name="footer"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), r(this), this._internals.role = "dialog", n(this, u);
	}
};
c([m({
	type: String,
	reflect: !0
})], h.prototype, "position", void 0), c([m({
	type: String,
	reflect: !0
})], h.prototype, "alignment", void 0), c([m({
	type: String,
	reflect: !0
})], h.prototype, "size", void 0), c([m({ type: Boolean })], h.prototype, "closable", void 0), c([m({
	type: Boolean,
	reflect: !0
})], h.prototype, "modal", void 0), c([m({ type: String })], h.prototype, "anchor", void 0), c([m({ type: String })], h.prototype, "trigger", void 0), c([m({
	type: Boolean,
	reflect: !0,
	attribute: "behavior-trigger"
})], h.prototype, "behaviorTrigger", void 0), c([m({ type: Object })], h.prototype, "i18n", void 0), h = c([e({ excessiveInstanceLimit: 50 }), a()], h);
//#endregion
export { h as Dialog };

//# sourceMappingURL=dialog2.js.map