import { audit as e } from "../internal/controllers/audit.controller.js";
import { keyNavigationList as t } from "../internal/controllers/keynav-list.controller.js";
import { attachInternals as n } from "../internal/utils/a11y.js";
import { stateSelected as r } from "../internal/controllers/state-selected.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 "./steps-item.js";
import l from "./steps.js";
import { ProgressRing as u } from "../progress-ring/progress-ring2.js";
import { LitElement as d, html as f } from "lit";
import { property as p } from "lit/decorators/property.js";
import { state as m } from "lit/decorators/state.js";
import { ButtonFormControlMixin as h } from "@nvidia-elements/forms/mixins";
import { queryAssignedElements as g } from "lit/decorators/query-assigned-elements.js";
import { when as _ } from "lit/directives/when.js";
//#region src/steps/steps.ts
var v = class extends h(d) {
	static {
		this.styles = a([c]);
	}
	static {
		this.metadata = {
			tag: "nve-steps-item",
			version: "2.0.2",
			parents: ["nve-steps"]
		};
	}
	static {
		this.elementDefinitions = {
			[s.metadata.tag]: s,
			[u.metadata.tag]: u
		};
	}
	render() {
		return f`<div internal-host focus-within><slot name="status-icon">${this.status ? "" : f`<nve-icon-button part="icon-button" readonly="readonly" id="number-icon" .disabled="${this.disabled}">${this.index}</nve-icon-button>`} ${this.status === "success" ? f`<nve-icon-button part="icon-button" readonly="readonly" size="sm" interaction="emphasis" icon-name="check"></nve-icon-button>` : ""} ${this.status === "danger" ? f`<nve-icon-button part="icon-button" readonly="readonly" size="sm" interaction="destructive" icon-name="exclamation-circle"></nve-icon-button>` : ""} ${this.status === "pending" ? f`<nve-progress-ring part="progress-ring" status="accent" size="sm"></nve-progress-ring>` : ""}</slot>${_(this.container !== "condensed", () => f`<slot></slot>`)}</div>`;
	}
	constructor() {
		super(), this.selected = !1, this.index = 0, this.type = "button";
	}
	connectedCallback() {
		super.connectedCallback(), this._internals.role = "tab";
	}
};
o([p({
	type: Boolean,
	reflect: !0
})], v.prototype, "selected", void 0), o([p({
	type: String,
	reflect: !0
})], v.prototype, "status", void 0), o([p({
	type: String,
	reflect: !0
})], v.prototype, "container", void 0), o([m()], v.prototype, "index", void 0), v = o([
	e(),
	i(),
	r()
], v);
var y = class extends d {
	constructor(...e) {
		super(...e), this.vertical = !1, this.behaviorSelect = !1, this.#t = (e) => {
			this.#e(e.target);
		};
	}
	static {
		this.styles = a([l]);
	}
	static {
		this.metadata = {
			tag: "nve-steps",
			version: "2.0.2",
			children: ["nve-steps-item"]
		};
	}
	get keynavListConfig() {
		return {
			items: this.steps,
			layout: this.vertical ? "vertical" : "horizontal"
		};
	}
	#e(e) {
		!this.behaviorSelect || !e.matches("nve-steps-item") || e.disabled || (this.steps.forEach((e) => e.selected = !1), e.selected = !0);
	}
	render() {
		return f`<div internal-host><slot @slotchange="${this.#n}"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), n(this), this._internals.role = "tablist", this.addEventListener("click", this.#t);
	}
	disconnectedCallback() {
		super.disconnectedCallback(), this.removeEventListener("click", this.#t);
	}
	#t;
	updated(e) {
		super.updated(e), (e.has("container") || e.has("vertical")) && this.#n();
	}
	#n() {
		this._internals.ariaOrientation = this.vertical ? "vertical" : "horizontal", this.steps.forEach((e, t) => {
			e.index = t + 1, e.container = this.container;
		});
	}
};
o([p({
	type: Boolean,
	reflect: !0
})], y.prototype, "vertical", void 0), o([p({
	type: String,
	reflect: !0
})], y.prototype, "container", void 0), o([p({
	type: Boolean,
	attribute: "behavior-select"
})], y.prototype, "behaviorSelect", void 0), o([g({ selector: "nve-steps-item" })], y.prototype, "steps", void 0), y = o([e(), t()], y);
//#endregion
export { y as Steps, v as StepsItem };

//# sourceMappingURL=steps2.js.map