import { I18nController as e } from "../internal/controllers/i18n.controller.js";
import { attachInternals as t } from "../internal/utils/a11y.js";
import { stateExpanded as n } from "../internal/controllers/state-expanded.controller.js";
import { TypeExpandableController as r } from "../internal/controllers/type-expandable.controller.js";
import { scopedRegistry as i } from "../internal/decorators/scoped-registry.js";
import { useStyles as a } from "../internal/styles/index.js";
import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
import { IconButton as s } from "../icon-button/icon-button2.js";
import c from "./panel.js";
import l from "./panel-header.js";
import u from "./panel-content.js";
import d from "./panel-footer.js";
import { LitElement as f, html as p } from "lit";
import { property as m } from "lit/decorators/property.js";
import { when as h } from "lit/directives/when.js";
//#region src/panel/panel.ts
var g = class extends f {
	static {
		this.styles = a([l]);
	}
	static {
		this.metadata = {
			tag: "nve-panel-header",
			version: "2.0.2"
		};
	}
	render() {
		return p`<div internal-host><div id="titles"><slot name="title"></slot><slot name="subtitle"></slot><slot></slot></div><slot name="action-icon"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), this.slot = "header";
	}
}, _ = class extends f {
	static {
		this.styles = a([u]);
	}
	static {
		this.metadata = {
			tag: "nve-panel-content",
			version: "2.0.2"
		};
	}
	render() {
		return p`<slot></slot>`;
	}
}, v = class extends f {
	static {
		this.styles = a([d]);
	}
	static {
		this.metadata = {
			tag: "nve-panel-footer",
			version: "2.0.2"
		};
	}
	render() {
		return p`<footer internal-host><slot></slot></footer>`;
	}
	connectedCallback() {
		super.connectedCallback(), this.slot = "footer";
	}
}, y = class extends f {
	constructor(...t) {
		super(...t), this.expanded = !1, this.closable = !1, this.behaviorExpand = !1, this.side = "left", this.#e = new e(this), this.#t = new r(this), this.i18n = this.#e.i18n;
	}
	static {
		this.styles = a([c]);
	}
	static {
		this.metadata = {
			tag: "nve-panel",
			version: "2.0.2"
		};
	}
	static {
		this.elementDefinitions = { [s.metadata.tag]: s };
	}
	#e;
	#t;
	get #n() {
		return this.side === "left" ? this.expanded ? "left" : "right" : this.expanded ? "right" : "left";
	}
	render() {
		return p`<div internal-host><div class="header"><slot name="header"></slot>${h(!this.closable, () => p`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" .container="${this.expanded ? "flat" : void 0}" icon-name="double-chevron" @click="${() => this.#t.toggle()}" .direction="${this.#n}" .expanded="${this.expanded}" .ariaLabel="${this.expanded ? this.i18n.close : this.i18n.expand}"></nve-icon-button>`, () => p`<nve-icon-button part="icon-button" exportparts="icon:icon-button-icon" container="flat" icon-name="cancel" @click="${() => this.#t.close()}" .expanded="${this.expanded}" .ariaLabel="${this.expanded ? this.i18n.hide : this.i18n.show}"></nve-icon-button>`)}</div><div class="content"><slot></slot></div><slot name="footer"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), t(this), this._internals.role = "region";
	}
};
o([m({
	type: Boolean,
	reflect: !0
})], y.prototype, "expanded", void 0), o([m({ type: Boolean })], y.prototype, "closable", void 0), o([m({
	type: Boolean,
	attribute: "behavior-expand"
})], y.prototype, "behaviorExpand", void 0), o([m({ type: String })], y.prototype, "side", void 0), o([m({ type: Object })], y.prototype, "i18n", void 0), y = o([i(), n()], y);
//#endregion
export { y as Panel, _ as PanelContent, v as PanelFooter, g as PanelHeader };

//# sourceMappingURL=panel2.js.map