"use client" /** Body trailing rows, shell classes, bulk bar and sticky foot stack. */ import * as React from "react" import { cn } from "../../lib/utils" import { DATA_TABLE_GRID_INSET_CLASS } from "../../lib/table-edge-inset" import { useModKeyLabel, useAltKeyLabel } from "../../hooks/use-mod-key-label" import { LeoLoadingRows, type LeoLoadingConfig } from "./leo-loading-row" import { SPLIT_MAX_VISIBLE } from "./table-helpers" import type { ColumnDef } from "./types" // ───────────────────────────────────────────────────────────────────────────── // Body footer rows // ───────────────────────────────────────────────────────────────────────────── /** Sub-row count for a split row: the longest split column, at least 1. */ export function splitCountFor>( row: TData, displayCols: ColumnDef[], ): number { let n = 1 for (const c of displayCols) { if (c.split) n = Math.max(n, Math.min(c.split.items(row).length, c.split.maxVisible ?? SPLIT_MAX_VISIBLE)) } return n } function LazyLoadingRow({ colSpan, label }: { colSpan: number; label: string }) { return (