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 { stateScroll as a } from "../internal/controllers/state-scroll.controller.js";
import { useStyles as o } from "../internal/styles/index.js";
import { __decorate as s } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/decorate.js";
import { GridPlaceholder as c } from "./placeholder/placeholder2.js";
import { GridColumn as l } from "./column/column2.js";
import { GridCell as u } from "./cell/cell2.js";
import { GridRow as d } from "./row/row2.js";
import { GridHeader as f } from "./header/header2.js";
import { GridFooter as p } from "./footer/footer2.js";
import m from "./grid.js";
import h from "./grid.global.js";
import { LitElement as g, html as _ } from "lit";
import { property as v } from "lit/decorators/property.js";
//#region src/grid/grid.ts
var y = class extends g {
	static {
		this.styles = o([m]);
	}
	static {
		this.metadata = {
			tag: "nve-grid",
			version: "2.0.2",
			children: [
				d.metadata.tag,
				f.metadata.tag,
				p.metadata.tag,
				c.metadata.tag
			]
		};
	}
	static {
		this.elementDefinitions = {};
	}
	get keynavGridConfig() {
		return {
			columns: this.#n,
			rows: [this.#t, ...this.#e],
			cells: [...this.#n, ...this.#r]
		};
	}
	get stateScrollConfig() {
		return { target: this.shadowRoot?.querySelector("[part=\"_scrollbox\"]") ?? void 0 };
	}
	get #e() {
		return Array.from(this.querySelectorAll(d.metadata.tag));
	}
	get #t() {
		return this.querySelector(f.metadata.tag);
	}
	get #n() {
		return Array.from(this.querySelectorAll(l.metadata.tag));
	}
	get #r() {
		return Array.from(this.querySelectorAll(u.metadata.tag));
	}
	render() {
		return _`<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, h);
	}
	async scrollTo(...e) {
		await this.shadowRoot.querySelector("[part=\"_scrollbox\"]")?.scrollTo(...e);
	}
};
s([v({
	type: String,
	reflect: !0
})], y.prototype, "container", void 0), s([v({
	type: Boolean,
	reflect: !0
})], y.prototype, "stripe", void 0), y = s([
	e(),
	a(),
	r()
], y);
//#endregion
export { y as Grid };

//# sourceMappingURL=grid2.js.map