import { I18nController as e } from "../internal/controllers/i18n.controller.js";
import { attachInternals as t } from "../internal/utils/a11y.js";
import { scopedRegistry as n } from "../internal/decorators/scoped-registry.js";
import { useStyles as r } from "../internal/styles/index.js";
import { statusIcons as i } from "../internal/types/index.js";
import { __decorate as a } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
import { Icon as o } from "../icon/icon2.js";
import s from "./progress-ring.js";
import { LitElement as c, html as l } from "lit";
import { property as u } from "lit/decorators/property.js";
//#region src/progress-ring/progress-ring.ts
var d = class extends c {
	constructor(...t) {
		super(...t), this.max = 100, this.status = "neutral", this.#e = new e(this), this.i18n = this.#e.i18n;
	}
	static {
		this.styles = r([s]);
	}
	static {
		this.metadata = {
			tag: "nve-progress-ring",
			version: "2.0.2"
		};
	}
	static {
		this.elementDefinitions = { [o.metadata.tag]: o };
	}
	#e;
	render() {
		return l`<div internal-host ?indeterminate="${this.value === void 0}"><svg viewBox="0 0 16 16" role="presentation"><circle cx="8px" cy="8px" r="6.5px" class="background"></circle><circle cx="8px" cy="8px" r="6.5px" class="ring" stroke-dasharray="${`${(this.value ?? 0) / (this.max ?? 100) * 44}px 44px`}"></circle></svg><slot>${this.status === "accent" ? "" : l`<nve-icon part="icon" .name="${this.status ? i[this.status] : void 0}" .status="${this.status}" aria-hidden="true"></nve-icon>`}</slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), t(this), this._internals.role = "progressbar";
	}
	updated(e) {
		super.updated(e), this._internals.ariaValueNow = `${this.value === void 0 ? "" : this.value}`, this._internals.ariaValueMax = `${this.max}`;
		let t = this.i18n;
		this._internals.ariaLabel = (this.status && t[this.status] && t[this.status] !== "neutral" ? t[this.status] : this.i18n.information) ?? null;
	}
};
a([u({ type: Number })], d.prototype, "value", void 0), a([u({ type: Number })], d.prototype, "max", void 0), a([u({
	type: String,
	reflect: !0
})], d.prototype, "status", void 0), a([u({
	type: String,
	reflect: !0
})], d.prototype, "size", void 0), a([u({ type: Object })], d.prototype, "i18n", void 0), d = a([n()], d);
//#endregion
export { d as ProgressRing };

//# sourceMappingURL=progress-ring2.js.map