import type { Cell, RowData, Table } from "@tanstack/react-table";
import React, { type ReactElement } from "react";
import type { ObjectTableLabels } from "./ObjectTableLabels.js";
import type { HeaderMenuFeatureFlags } from "./TableHeaderWithPopover.js";
import type { CellEditInfo, EditableConfig, EditFieldConfig } from "./utils/types.js";
declare module "@tanstack/react-table" {
	interface ColumnMeta<
		TData extends RowData = unknown,
		TValue = unknown
	> {
		columnName?: string;
		isAsyncColumn?: boolean;
		isVisible?: boolean;
		editable?: boolean | ((object: TData) => boolean);
		dataType?: string;
		/**
		* For columns backed by a `"marking"` property, the marking subtype as
		* surfaced by the platform: `"CBAC"` for classification-based access
		* control or `"MANDATORY"` for mandatory markings. Absent for
		* non-marking columns and for marking columns whose subtype isn't
		* exposed.
		*/
		markingType?: "CBAC" | "MANDATORY";
		editFieldConfig?: EditFieldConfig<TData>;
		validateEdit?: (value: unknown) => Promise<string | undefined>;
	}
	interface TableMeta<TData extends RowData = unknown> {
		onCellEdit?: (cellId: string, info: CellEditInfo<TData, unknown>) => void;
		onCellValidationError?: (cellId: string, error: string) => void;
		clearCellValidationError?: (cellId: string) => void;
		cellEdits?: Record<string, CellEditInfo<TData, unknown>>;
		isInEditMode?: boolean;
		validationErrors?: Map<string, string>;
		focusedRowId?: string | null;
	}
}
export interface BaseTableProps<TData extends RowData> {
	table: Table<TData>;
	isLoading?: boolean;
	fetchNextPage?: () => Promise<void>;
	onRowClick?: (row: TData) => void;
	onColumnHeaderClick?: (columnId: string) => void;
	rowHeight?: number;
	renderCellContextMenu?: (row: TData, cell: Cell<TData, unknown>) => React.ReactNode;
	className?: string;
	error?: Error;
	headerMenuFeatureFlags?: HeaderMenuFeatureFlags;
	editableConfig?: EditableConfig<TData, unknown>;
	getRowAttributes?: (object: TData) => Record<string, string | undefined>;
	/**
	* Whether to render the bottom edit footer. Defaults to `true`; the
	* footer is only rendered when the table has at least one editable
	* column (`hasEditableColumns`).
	*/
	showEditFooter?: boolean;
	/**
	* Render override for the empty state. Called when the table has no
	* rows and no error. When omitted, a default "No Data" indicator is
	* rendered.
	*/
	renderEmptyState?: () => React.ReactNode;
	/**
	* Controlled focused row id. `undefined` enables internal management
	*/
	focusedRowId?: string | null;
	/**
	* Fires whenever the focused row changes, in both controlled and
	* uncontrolled modes.
	*/
	onFocusedRowChanged?: (row: TData | null) => void;
	/**
	* Overrides for the table's user-facing strings. Provide any subset; unset
	* keys fall back to the built-in English defaults. See
	* {@link ObjectTableLabels}.
	*/
	labels?: Partial<ObjectTableLabels>;
}
export declare function BaseTable<TData extends RowData>(props: BaseTableProps<TData>): ReactElement;
