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 { TypeExpandableController as i } from "../../internal/controllers/type-expandable.controller.js";
import { scopedRegistry as a } from "../../internal/decorators/scoped-registry.js";
import { useStyles as o } from "../../internal/styles/index.js";
import { __decorate as s } from "../../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
import { IconButton as c } from "../../icon-button/icon-button2.js";
import l from "./page-panel.js";
import u from "./page-panel.global.js";
import { LitElement as d, html as f, nothing as p } from "lit";
import { property as m } from "lit/decorators/property.js";
//#region src/page/page-panel/page-panel.ts
var h = class extends d {
	constructor(...e) {
		super(...e), this.#e = new t(this), this.i18n = this.#e.i18n, this.#t = new i(this, { useHidden: !0 });
	}
	#e;
	static {
		this.styles = o([l]);
	}
	static {
		this.metadata = {
			tag: "nve-page-panel",
			version: "0.2.3",
			parents: ["nve-page"]
		};
	}
	static {
		this.elementDefinitions = { [c.metadata.tag]: c };
	}
	#t;
	get #n() {
		return {
			left: "left",
			right: "right",
			bottom: "bottom"
		}[this.slot] || "";
	}
	get #r() {
		return this.expandable ? "double-chevron" : "cancel";
	}
	get #i() {
		return {
			left: "left",
			right: "right",
			bottom: "down"
		}[this.#n] || "up";
	}
	render() {
		return f`<div internal-host><div part="_header"><slot name="header"></slot><slot name="actions">${this.closable || this.expandable ? f`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" @click="${() => this.#t.close()}" .iconName="${this.#r}" .direction="${this.#i}" aria-label="${this.i18n.close}" container="inline" role="button"></nve-icon-button>` : p}</slot></div><div class="content"><slot></slot></div><div><slot name="footer"></slot></div></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), r(this), n(this, u), this._internals.role = "region";
	}
};
s([m({
	type: String,
	reflect: !0
})], h.prototype, "size", void 0), s([m({ type: Boolean })], h.prototype, "closable", void 0), s([m({ type: Boolean })], h.prototype, "expandable", void 0), s([m({ type: Object })], h.prototype, "i18n", void 0), h = s([e(), a()], h);
//#endregion
export { h as PagePanel };

//# sourceMappingURL=page-panel2.js.map