import { ColumnHelper } from '@tanstack/react-table'; import { ReactNode } from 'react'; import { ColumnDef, EditMode } from '../../../types'; declare module "@tanstack/react-table" { interface ColumnMeta { editMode?: EditMode; editConfig?: ColumnDef["editConfig"]; /** * The original column definition, stored for type narrowing and runtime access */ columnDef?: ColumnDef; /** * Whether the header action (expand all / select all) is disabled for this column */ disableHeaderAction?: boolean; /** * Resolved header alignment for DataTable-owned header layout. */ headerAlign?: HeaderAlign; /** * Whether this column renders a grouped header. */ isGroupHeader?: boolean; } } /** * Props for the getTanStackColumnDef function */ export type TanStackColumnDefProps = { /** * The column definition to convert to a TanStack column definition */ columnDef: ColumnDef; /** * Table-level default content for empty cells. Column-level `emptyCellContent` * takes precedence over this value. */ emptyCellContent?: ReactNode; }; type TanStackColumnDef = ReturnType["group"]> | ReturnType["accessor"]>; type HeaderAlign = "start" | "center" | "end"; /** * Build the column definition for TanStack useReactTable. * This converts our ColumnDef to TanStack's column definition format, * preserving the original column definition in meta for type narrowing. * * @param props - The props for the getTanStackColumnDef function * @param props.columnDef - The column definition to convert * @returns The column definition for TanStack useReactTable */ export declare function getTanStackColumnDef({ columnDef, emptyCellContent, }: TanStackColumnDefProps): TanStackColumnDef; export {};