import { audit as e } from "../internal/controllers/audit.controller.js";
import { appendRootNodeStyle as t, generateId as n } from "../internal/utils/dom.js";
import { keyNavigationGrid as r } from "../internal/controllers/keynav-grid.controller.js";
import { attachInternals as i } from "../internal/utils/a11y.js";
import { useStyles as a } from "../internal/styles/index.js";
import { __decorate as o } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/decorate.js";
import { GridPlaceholder as s } from "./placeholder/placeholder2.js";
import { GridColumn as c } from "./column/column2.js";
import { GridCell as l } from "./cell/cell2.js";
import { GridRow as u } from "./row/row2.js";
import { GridHeader as d } from "./header/header2.js";
import { GridFooter as f } from "./footer/footer2.js";
import p from "./grid.js";
import m from "./grid.global.js";
import { LitElement as h, html as g } from "lit";
import { property as _ } from "lit/decorators/property.js";
//#region src/grid/grid.ts
var v = class extends h {
	static {
		this.styles = a([p]);
	}
	static {
		this.metadata = {
			tag: "nve-grid",
			version: "0.2.3",
			children: [
				u.metadata.tag,
				d.metadata.tag,
				f.metadata.tag,
				s.metadata.tag
			]
		};
	}
	static {
		this.elementDefinitions = {};
	}
	get keynavGridConfig() {
		return {
			columns: this.#n,
			rows: [this.#t, ...this.#e],
			cells: [...this.#n, ...this.#r]
		};
	}
	get #e() {
		return Array.from(this.querySelectorAll(u.metadata.tag));
	}
	get #t() {
		return this.querySelector(d.metadata.tag);
	}
	get #n() {
		return Array.from(this.querySelectorAll(c.metadata.tag));
	}
	get #r() {
		return Array.from(this.querySelectorAll(l.metadata.tag));
	}
	render() {
		return g`<div internal-host><div part="_scrollbox"><slot></slot></div><slot name="footer"></slot></div>`;
	}
	connectedCallback() {
		super.connectedCallback(), i(this), this._internals.role = "grid", this.id ||= n(), t(this, m);
	}
	async scrollTo(...e) {
		await this.shadowRoot.querySelector("[part=\"_scrollbox\"]")?.scrollTo(...e);
	}
};
o([_({
	type: String,
	reflect: !0
})], v.prototype, "container", void 0), o([_({
	type: Boolean,
	reflect: !0
})], v.prototype, "stripe", void 0), v = o([e(), r()], v);
//#endregion
export { v as Grid };

//# sourceMappingURL=grid2.js.map