const v = {
  expand: "▶",
  collapse: "▼",
  sortAsc: "▲",
  sortDesc: "▼",
  sortNone: "⇅",
  submenuArrow: "▶",
  dragHandle: "⋮⋮",
  toolPanel: "☰"
};
class R {
  /**
   * Plugin dependencies - declare other plugins this one requires.
   *
   * Dependencies are validated when the plugin is attached.
   * Required dependencies throw an error if missing.
   * Optional dependencies log an info message if missing.
   *
   * @example
   * ```typescript
   * static readonly dependencies: PluginDependency[] = [
   *   { name: 'editing', required: true, reason: 'Tracks cell edits for undo/redo' },
   *   { name: 'selection', required: false, reason: 'Enables selection-based undo' },
   * ];
   * ```
   */
  static dependencies;
  /**
   * Plugin version - defaults to grid version for built-in plugins.
   * Third-party plugins can override with their own semver.
   */
  version = typeof __GRID_VERSION__ < "u" ? __GRID_VERSION__ : "dev";
  /** CSS styles to inject into the grid's shadow DOM */
  styles;
  /** Custom cell renderers keyed by type name */
  cellRenderers;
  /** Custom header renderers keyed by type name */
  headerRenderers;
  /** Custom cell editors keyed by type name */
  cellEditors;
  /** The grid instance this plugin is attached to */
  grid;
  /** Plugin configuration - merged with defaults in attach() */
  config;
  /** User-provided configuration from constructor */
  userConfig;
  /**
   * Plugin-level AbortController for event listener cleanup.
   * Created fresh in attach(), aborted in detach().
   * This ensures event listeners are properly cleaned up when plugins are re-attached.
   */
  #e;
  /**
   * Default configuration - subclasses should override this getter.
   * Note: This must be a getter (not property initializer) for proper inheritance
   * since property initializers run after parent constructor.
   */
  get defaultConfig() {
    return {};
  }
  constructor(e = {}) {
    this.userConfig = e;
  }
  /**
   * Called when the plugin is attached to a grid.
   * Override to set up event listeners, initialize state, etc.
   *
   * @example
   * ```ts
   * attach(grid: GridElement): void {
   *   super.attach(grid);
   *   // Set up document-level listeners with auto-cleanup
   *   document.addEventListener('keydown', this.handleEscape, {
   *     signal: this.disconnectSignal
   *   });
   * }
   * ```
   */
  attach(e) {
    this.#e?.abort(), this.#e = new AbortController(), this.grid = e, this.config = { ...this.defaultConfig, ...this.userConfig };
  }
  /**
   * Called when the plugin is detached from a grid.
   * Override to clean up event listeners, timers, etc.
   *
   * @example
   * ```ts
   * detach(): void {
   *   // Clean up any state not handled by disconnectSignal
   *   this.selectedRows.clear();
   *   this.cache = null;
   * }
   * ```
   */
  detach() {
    this.#e?.abort(), this.#e = void 0;
  }
  /**
   * Get another plugin instance from the same grid.
   * Use for inter-plugin communication.
   *
   * @example
   * ```ts
   * const selection = this.getPlugin(SelectionPlugin);
   * if (selection) {
   *   const selectedRows = selection.getSelectedRows();
   * }
   * ```
   */
  getPlugin(e) {
    return this.grid?.getPlugin(e);
  }
  /**
   * Emit a custom event from the grid.
   */
  emit(e, t) {
    this.grid?.dispatchEvent?.(new CustomEvent(e, { detail: t, bubbles: !0 }));
  }
  /**
   * Emit a cancelable custom event from the grid.
   * @returns `true` if the event was cancelled (preventDefault called), `false` otherwise
   */
  emitCancelable(e, t) {
    const r = new CustomEvent(e, { detail: t, bubbles: !0, cancelable: !0 });
    return this.grid?.dispatchEvent?.(r), r.defaultPrevented;
  }
  /**
   * Request a re-render of the grid.
   */
  requestRender() {
    this.grid?.requestRender?.();
  }
  /**
   * Request a re-render and restore focus styling afterward.
   * Use this when a plugin action (like expand/collapse) triggers a render
   * but needs to maintain keyboard navigation focus.
   */
  requestRenderWithFocus() {
    this.grid?.requestRenderWithFocus?.();
  }
  /**
   * Request a lightweight style update without rebuilding DOM.
   * Use this instead of requestRender() when only CSS classes need updating.
   */
  requestAfterRender() {
    this.grid?.requestAfterRender?.();
  }
  /**
   * Get the current rows from the grid.
   */
  get rows() {
    return this.grid?.rows ?? [];
  }
  /**
   * Get the original unfiltered/unprocessed rows from the grid.
   * Use this when you need all source data regardless of active filters.
   */
  get sourceRows() {
    return this.grid?.sourceRows ?? [];
  }
  /**
   * Get the current columns from the grid.
   */
  get columns() {
    return this.grid?.columns ?? [];
  }
  /**
   * Get only visible columns from the grid (excludes hidden).
   * Use this for rendering that needs to match the grid template.
   */
  get visibleColumns() {
    return this.grid?._visibleColumns ?? [];
  }
  /**
   * Get the grid as an HTMLElement for direct DOM operations.
   * Use sparingly - prefer the typed GridElementRef API when possible.
   *
   * @example
   * ```ts
   * const width = this.gridElement.clientWidth;
   * this.gridElement.classList.add('my-plugin-active');
   * ```
   */
  get gridElement() {
    return this.grid;
  }
  /**
   * Get the render root of the grid for DOM queries.
   * @deprecated Use `gridElement` instead. This getter exists only for backward compatibility.
   *
   * With Shadow DOM removed, the grid element itself is the render root.
   * All new code should use `this.gridElement` for DOM queries.
   *
   * @example
   * // OLD (deprecated)
   * const rows = this.shadowRoot?.querySelector('.rows');
   *
   * // NEW (preferred)
   * const rows = this.gridElement.querySelector('.rows');
   */
  get shadowRoot() {
    return this.gridElement;
  }
  /**
   * Get the disconnect signal for event listener cleanup.
   * This signal is aborted when the grid disconnects from the DOM.
   * Use this when adding event listeners that should be cleaned up automatically.
   *
   * Best for:
   * - Document/window-level listeners added in attach()
   * - Listeners on the grid element itself
   * - Any listener that should persist across renders
   *
   * Not needed for:
   * - Listeners on elements created in afterRender() (removed with element)
   *
   * @example
   * element.addEventListener('click', handler, { signal: this.disconnectSignal });
   * document.addEventListener('keydown', handler, { signal: this.disconnectSignal });
   */
  get disconnectSignal() {
    return this.#e?.signal ?? this.grid?.disconnectSignal;
  }
  /**
   * Get the grid-level icons configuration.
   * Returns merged icons (user config + defaults).
   */
  get gridIcons() {
    const e = this.grid?.gridConfig?.icons ?? {};
    return { ...v, ...e };
  }
  // #region Animation Helpers
  /**
   * Check if animations are enabled at the grid level.
   * Respects gridConfig.animation.mode and the CSS variable set by the grid.
   *
   * Plugins should use this to skip animations when:
   * - Animation mode is 'off' or `false`
   * - User prefers reduced motion and mode is 'reduced-motion' (default)
   *
   * @example
   * ```ts
   * private get animationStyle(): 'slide' | 'fade' | false {
   *   if (!this.isAnimationEnabled) return false;
   *   return this.config.animation ?? 'slide';
   * }
   * ```
   */
  get isAnimationEnabled() {
    const e = this.grid?.effectiveConfig?.animation?.mode ?? "reduced-motion";
    if (e === !1 || e === "off") return !1;
    if (e === !0 || e === "on") return !0;
    const t = this.gridElement;
    return t ? getComputedStyle(t).getPropertyValue("--tbw-animation-enabled").trim() !== "0" : !0;
  }
  /**
   * Get the animation duration in milliseconds from CSS variable.
   * Falls back to 200ms if not set.
   *
   * Plugins can use this for their animation timing to stay consistent
   * with the grid-level animation.duration setting.
   *
   * @example
   * ```ts
   * element.animate(keyframes, { duration: this.animationDuration });
   * ```
   */
  get animationDuration() {
    const e = this.gridElement;
    if (e) {
      const t = getComputedStyle(e).getPropertyValue("--tbw-animation-duration").trim(), r = parseInt(t, 10);
      if (!isNaN(r)) return r;
    }
    return 200;
  }
  // #endregion
  /**
   * Resolve an icon value to string or HTMLElement.
   * Checks plugin config first, then grid-level icons, then defaults.
   *
   * @param iconKey - The icon key in GridIcons (e.g., 'expand', 'collapse')
   * @param pluginOverride - Optional plugin-level override
   * @returns The resolved icon value
   */
  resolveIcon(e, t) {
    return t !== void 0 ? t : this.gridIcons[e];
  }
  /**
   * Set an icon value on an element.
   * Handles both string (text/HTML) and HTMLElement values.
   *
   * @param element - The element to set the icon on
   * @param icon - The icon value (string or HTMLElement)
   */
  setIcon(e, t) {
    typeof t == "string" ? e.innerHTML = t : t instanceof HTMLElement && (e.innerHTML = "", e.appendChild(t.cloneNode(!0)));
  }
  /**
   * Log a warning message.
   */
  warn(e) {
    console.warn(`[tbw-grid:${this.name}] ${e}`);
  }
  // #endregion
}
const x = "__tbw_expander";
function C(n) {
  return n.field === x;
}
const _ = {
  sum: (n, e) => n.reduce((t, r) => t + (Number(r[e]) || 0), 0),
  avg: (n, e) => {
    const t = n.reduce((r, s) => r + (Number(s[e]) || 0), 0);
    return n.length ? t / n.length : 0;
  },
  count: (n) => n.length,
  min: (n, e) => Math.min(...n.map((t) => Number(t[e]) || 1 / 0)),
  max: (n, e) => Math.max(...n.map((t) => Number(t[e]) || -1 / 0)),
  first: (n, e) => n[0]?.[e],
  last: (n, e) => n[n.length - 1]?.[e]
}, w = /* @__PURE__ */ new Map(), c = {
  /**
   * Register a custom aggregator function.
   */
  register(n, e) {
    w.set(n, e);
  },
  /**
   * Unregister a custom aggregator function.
   */
  unregister(n) {
    w.delete(n);
  },
  /**
   * Get an aggregator function by reference.
   */
  get(n) {
    if (n !== void 0)
      return typeof n == "function" ? n : w.get(n) ?? _[n];
  },
  /**
   * Run an aggregator on a set of rows.
   */
  run(n, e, t, r) {
    const s = this.get(n);
    return s ? s(e, t, r) : void 0;
  },
  /**
   * Check if an aggregator exists.
   */
  has(n) {
    return w.has(n) || n in _;
  },
  /**
   * List all available aggregator names.
   */
  list() {
    return [...Object.keys(_), ...w.keys()];
  }
};
c.register.bind(c);
c.unregister.bind(c);
c.get.bind(c);
const y = c.run.bind(c);
c.list.bind(c);
function A({ rows: n, config: e, expanded: t }) {
  const r = e.groupOn;
  if (typeof r != "function")
    return [];
  const s = { key: "__root__", value: null, depth: -1, rows: [], children: /* @__PURE__ */ new Map() };
  if (n.forEach((o) => {
    let a = r(o);
    a == null || a === !1 ? a = ["__ungrouped__"] : Array.isArray(a) || (a = [a]);
    let u = s;
    a.forEach((h, p) => {
      const f = h == null ? "∅" : String(h), l = u.key === "__root__" ? f : u.key + "||" + f;
      let g = u.children.get(f);
      g || (g = { key: l, value: h, depth: p, rows: [], children: /* @__PURE__ */ new Map(), parent: u }, u.children.set(f, g)), u = g;
    }), u.rows.push(o);
  }), s.children.size === 1 && s.children.has("__ungrouped__") && s.children.get("__ungrouped__").rows.length === n.length)
    return [];
  const i = [], d = (o) => {
    if (o === s) {
      o.children.forEach((u) => d(u));
      return;
    }
    const a = t.has(o.key);
    i.push({
      kind: "group",
      key: o.key,
      value: o.value,
      depth: o.depth,
      rows: o.rows,
      expanded: a
    }), a && (o.children.size ? o.children.forEach((u) => d(u)) : o.rows.forEach((u) => i.push({ kind: "data", row: u, rowIndex: n.indexOf(u) })));
  };
  return d(s), i;
}
function k(n, e) {
  const t = new Set(n);
  return t.has(e) ? t.delete(e) : t.add(e), t;
}
function E(n) {
  const e = /* @__PURE__ */ new Set();
  for (const t of n)
    t.kind === "group" && e.add(t.key);
  return e;
}
function S() {
  return /* @__PURE__ */ new Set();
}
function K(n) {
  return n.kind !== "group" ? 0 : n.rows.length;
}
const G = "@layer tbw-plugins{.group-row{display:grid;grid-template-columns:var(--tbw-column-template);background:var(--tbw-grouping-rows-bg, var(--tbw-color-panel-bg));font-weight:500;border-bottom:var(--tbw-row-divider);min-height:var(--tbw-row-height)}.group-row .cell{display:flex;align-items:center;padding:var(--tbw-cell-padding, .125rem .5rem)}.group-row:hover{background:var(--tbw-grouping-rows-bg-hover, var(--tbw-color-row-hover))}.group-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;align-items:center;justify-content:center;width:var(--tbw-toggle-size, 1.25rem);height:var(--tbw-toggle-size, 1.25rem);margin-right:.25rem;background:none;border:0;font:inherit}.group-toggle:hover{background:var(--tbw-grouping-rows-toggle-hover, var(--tbw-color-row-hover));border-radius:var(--tbw-border-radius, .125rem)}.group-label{display:inline-flex;align-items:center;gap:var(--tbw-panel-gap, var(--tbw-spacing-md, .5rem))}.group-count{color:var(--tbw-grouping-rows-count-color, var(--tbw-color-fg-muted));font-size:var(--tbw-font-size-xs, .85em);font-weight:400}.group-row{padding-left:calc(var(--tbw-group-depth, 0) * var(--tbw-group-indent-width, 1.25em))}.data-grid-row.tbw-group-slide-in{animation:tbw-group-slide-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-slide-in{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}.data-grid-row.tbw-group-fade-in{animation:tbw-group-fade-in var(--tbw-animation-duration, .2s) var(--tbw-animation-easing, ease-out) forwards}@keyframes tbw-group-fade-in{0%{opacity:0}to{opacity:1}}}";
class T extends R {
  name = "groupingRows";
  styles = G;
  get defaultConfig() {
    return {
      defaultExpanded: !1,
      showRowCount: !0,
      indentWidth: 20,
      aggregators: {},
      animation: "slide"
    };
  }
  // #region Internal State
  expandedKeys = /* @__PURE__ */ new Set();
  flattenedRows = [];
  isActive = !1;
  previousVisibleKeys = /* @__PURE__ */ new Set();
  keysToAnimate = /* @__PURE__ */ new Set();
  // #endregion
  // #region Animation
  /**
   * Get expand/collapse animation style from plugin config.
   * Uses base class isAnimationEnabled to respect grid-level settings.
   */
  get animationStyle() {
    return this.isAnimationEnabled ? this.config.animation ?? "slide" : !1;
  }
  // #endregion
  // #region Lifecycle
  detach() {
    this.expandedKeys.clear(), this.flattenedRows = [], this.isActive = !1, this.previousVisibleKeys.clear(), this.keysToAnimate.clear();
  }
  // #endregion
  // #region Hooks
  /**
   * Auto-detect grouping configuration from grid config.
   * Called by plugin system to determine if plugin should activate.
   */
  static detect(e, t) {
    return typeof t?.groupOn == "function" || typeof t?.enableRowGrouping == "boolean";
  }
  processRows(e) {
    const t = this.config;
    if (typeof t.groupOn != "function")
      return this.isActive = !1, this.flattenedRows = [], [...e];
    const r = A({
      rows: [...e],
      config: t,
      expanded: this.expandedKeys
    });
    if (r.length === 0)
      return this.isActive = !1, this.flattenedRows = [], [...e];
    this.isActive = !0, this.flattenedRows = r, this.keysToAnimate.clear();
    const s = /* @__PURE__ */ new Set();
    return r.forEach((i, d) => {
      if (i.kind === "data") {
        const o = `data-${d}`;
        s.add(o), this.previousVisibleKeys.has(o) || this.keysToAnimate.add(o);
      }
    }), this.previousVisibleKeys = s, r.map((i) => i.kind === "group" ? {
      __isGroupRow: !0,
      __groupKey: i.key,
      __groupValue: i.value,
      __groupDepth: i.depth,
      __groupRows: i.rows,
      __groupExpanded: i.expanded,
      __groupRowCount: K(i)
    } : i.row);
  }
  onCellClick(e) {
    const t = e.row;
    if (t?.__isGroupRow && e.originalEvent.target?.closest(".group-toggle"))
      return this.toggle(t.__groupKey), !0;
  }
  onKeyDown(e) {
    if (e.key !== " ") return;
    const t = this.grid._focusRow, r = this.rows[t];
    if (r?.__isGroupRow)
      return e.preventDefault(), this.toggle(r.__groupKey), this.requestRenderWithFocus(), !0;
  }
  /**
   * Render a row. Returns true if we handled the row (group row), false otherwise.
   */
  renderRow(e, t, r) {
    if (!e?.__isGroupRow)
      return !1;
    const s = this.config;
    if (s.groupRowRenderer) {
      const o = () => {
        this.toggle(e.__groupKey);
      }, a = s.groupRowRenderer({
        key: e.__groupKey,
        value: e.__groupValue,
        depth: e.__groupDepth,
        rows: e.__groupRows,
        expanded: e.__groupExpanded,
        toggleExpand: o
      });
      if (a)
        return t.className = "data-grid-row group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), typeof a == "string" ? t.innerHTML = a : (t.innerHTML = "", t.appendChild(a)), !0;
    }
    const i = () => {
      this.toggle(e.__groupKey);
    };
    return t.className = "data-grid-row group-row", t.__isCustomRow = !0, t.setAttribute("data-group-depth", String(e.__groupDepth)), t.setAttribute("role", "row"), t.setAttribute("aria-expanded", String(e.__groupExpanded)), t.style.setProperty("--tbw-group-depth", String(e.__groupDepth || 0)), s.indentWidth !== void 0 && t.style.setProperty("--tbw-group-indent-width", `${s.indentWidth}px`), t.innerHTML = "", s.fullWidth !== !1 ? this.renderFullWidthGroupRow(e, t, i) : this.renderPerColumnGroupRow(e, t, i), !0;
  }
  afterRender() {
    const e = this.animationStyle;
    if (e === !1 || this.keysToAnimate.size === 0) return;
    const t = this.gridElement?.querySelector(".rows");
    if (!t) return;
    const r = e === "fade" ? "tbw-group-fade-in" : "tbw-group-slide-in";
    for (const s of t.querySelectorAll(".data-grid-row:not(.group-row)")) {
      const i = s.querySelector(".cell[data-row]"), d = i ? parseInt(i.getAttribute("data-row") ?? "-1", 10) : -1, a = this.flattenedRows[d]?.kind === "data" ? `data-${d}` : void 0;
      a && this.keysToAnimate.has(a) && (s.classList.add(r), s.addEventListener("animationend", () => s.classList.remove(r), { once: !0 }));
    }
    this.keysToAnimate.clear();
  }
  // #endregion
  // #region Private Rendering Helpers
  /**
   * Create a toggle button for expanding/collapsing a group.
   */
  createToggleButton(e, t) {
    const r = document.createElement("button");
    return r.type = "button", r.className = `group-toggle${e ? " expanded" : ""}`, r.setAttribute("aria-label", e ? "Collapse group" : "Expand group"), this.setIcon(r, this.resolveIcon(e ? "collapse" : "expand")), r.addEventListener("click", (s) => {
      s.stopPropagation(), t();
    }), r;
  }
  /**
   * Get the formatted label text for a group.
   */
  getGroupLabelText(e, t, r) {
    const s = this.config;
    return s.formatLabel ? s.formatLabel(e, t, r) : String(e);
  }
  renderFullWidthGroupRow(e, t, r) {
    const s = this.config, i = document.createElement("div");
    i.className = "cell group-full", i.style.gridColumn = "1 / -1", i.setAttribute("role", "gridcell"), i.setAttribute("data-col", "0"), i.appendChild(this.createToggleButton(e.__groupExpanded, r));
    const d = document.createElement("span");
    if (d.className = "group-label", d.textContent = this.getGroupLabelText(e.__groupValue, e.__groupDepth || 0, e.__groupKey), i.appendChild(d), s.showRowCount !== !1) {
      const o = document.createElement("span");
      o.className = "group-count", o.textContent = `(${e.__groupRowCount ?? e.__groupRows?.length ?? 0})`, i.appendChild(o);
    }
    t.appendChild(i);
  }
  renderPerColumnGroupRow(e, t, r) {
    const s = this.config, i = s.aggregators ?? {}, d = this.columns, o = e.__groupRows ?? [], u = this.gridElement?.querySelector(".body")?.style.gridTemplateColumns || "";
    u && (t.style.display = "grid", t.style.gridTemplateColumns = u);
    let h = !1;
    d.forEach((p, f) => {
      const l = document.createElement("div");
      if (l.className = "cell group-cell", l.setAttribute("data-col", String(f)), l.setAttribute("role", "gridcell"), C(p)) {
        l.setAttribute("data-field", p.field), t.appendChild(l);
        return;
      }
      if (h) {
        const g = i[p.field];
        if (g) {
          const b = y(g, o, p.field, p);
          l.textContent = b != null ? String(b) : "";
        } else
          l.textContent = "";
      } else {
        h = !0, l.appendChild(this.createToggleButton(e.__groupExpanded, r));
        const g = document.createElement("span"), b = i[p.field];
        if (b) {
          const m = y(b, o, p.field, p);
          g.textContent = m != null ? String(m) : String(e.__groupValue);
        } else
          g.textContent = this.getGroupLabelText(e.__groupValue, e.__groupDepth || 0, e.__groupKey);
        if (l.appendChild(g), s.showRowCount !== !1) {
          const m = document.createElement("span");
          m.className = "group-count", m.textContent = ` (${o.length})`, l.appendChild(m);
        }
      }
      t.appendChild(l);
    });
  }
  // #endregion
  // #region Public API
  /**
   * Expand all groups.
   */
  expandAll() {
    this.expandedKeys = E(this.flattenedRows), this.requestRender();
  }
  /**
   * Collapse all groups.
   */
  collapseAll() {
    this.expandedKeys = S(), this.requestRender();
  }
  /**
   * Toggle expansion of a specific group.
   * @param key - The group key to toggle
   */
  toggle(e) {
    this.expandedKeys = k(this.expandedKeys, e);
    const t = this.flattenedRows.find((r) => r.kind === "group" && r.key === e);
    this.emit("group-toggle", {
      key: e,
      expanded: this.expandedKeys.has(e),
      value: t?.value,
      depth: t?.depth ?? 0
    }), this.requestRender();
  }
  /**
   * Check if a specific group is expanded.
   * @param key - The group key to check
   * @returns Whether the group is expanded
   */
  isExpanded(e) {
    return this.expandedKeys.has(e);
  }
  /**
   * Expand a specific group.
   * @param key - The group key to expand
   */
  expand(e) {
    this.expandedKeys.has(e) || (this.expandedKeys = /* @__PURE__ */ new Set([...this.expandedKeys, e]), this.requestRender());
  }
  /**
   * Collapse a specific group.
   * @param key - The group key to collapse
   */
  collapse(e) {
    if (this.expandedKeys.has(e)) {
      const t = new Set(this.expandedKeys);
      t.delete(e), this.expandedKeys = t, this.requestRender();
    }
  }
  /**
   * Get the current group state.
   * @returns Group state information
   */
  getGroupState() {
    const e = this.flattenedRows.filter((t) => t.kind === "group");
    return {
      isActive: this.isActive,
      expandedCount: this.expandedKeys.size,
      totalGroups: e.length,
      expandedKeys: [...this.expandedKeys]
    };
  }
  /**
   * Get the total count of visible rows (including group headers).
   * @returns Number of visible rows
   */
  getRowCount() {
    return this.flattenedRows.length;
  }
  /**
   * Refresh the grouped row model.
   * Call this after modifying groupOn or other config options.
   */
  refreshGroups() {
    this.requestRender();
  }
  /**
   * Get current expanded group keys.
   * @returns Array of expanded group keys
   */
  getExpandedGroups() {
    return [...this.expandedKeys];
  }
  /**
   * Get the flattened row model.
   * @returns Array of render rows (groups + data rows)
   */
  getFlattenedRows() {
    return this.flattenedRows;
  }
  /**
   * Check if grouping is currently active.
   * @returns Whether grouping is active
   */
  isGroupingActive() {
    return this.isActive;
  }
  /**
   * Set the groupOn function dynamically.
   * @param fn - The groupOn function or undefined to disable
   */
  setGroupOn(e) {
    this.config.groupOn = e, this.requestRender();
  }
  // #endregion
}
export {
  T as GroupingRowsPlugin
};
//# sourceMappingURL=index.js.map
