import { ReactNode } from 'react';
import { TableRow } from '../types';
import { Svg } from '../../../../types';
/**
 * Configuration for the empty state displayed when the DataTable has no data
 */
export type DataTableEmptyState = {
    /**
     * Optional SVG illustration component to display.
     * Pass a single SVG component, or an object with `light` and `dark` properties
     * to display different illustrations based on the user's color scheme preference.
     */
    svg?: Svg | {
        light?: Svg;
        dark?: Svg;
    };
    /**
     * Optional content to display below the illustration
     */
    content?: ReactNode;
};
/**
 * Configuration for pagination in DataTable
 */
export type DataTablePaginationConfig<T> = {
    /**
     * Number of rows displayed per page
     * @default 25
     */
    rowsPerPage?: number;
    /**
     * Available options for rows per page selection
     * @default [25, 50, 100]
     */
    rowsPerPageOptions?: number[];
    /**
     * Callback when rows per page changes
     */
    onRowsPerPageChange?: (rowsPerPage: number) => void;
    /**
     * Current page index (0-based)
     */
    currentPageIndex?: number;
    /**
     * Function to get the data for the current page. When used, the data displayed will be
     * fully controlled by the implementor. This is useful for server-side pagination scenarios where
     * the total number of rows may differ from the data array length.
     */
    loadPageData?: ({ pageIndex, pageSize, }: {
        pageIndex: number;
        pageSize: number;
    }) => TableRow<T>[] | Promise<TableRow<T>[]>;
    /**
     * Default page index for uncontrolled mode (0-based)
     * @default 0
     */
    defaultPageIndex?: number;
    /**
     * Callback when page changes. Receives the new page index (0-based)
     */
    onPageChange?: (pageIndex: number) => void;
    /**
     * Whether to display the item count information in pagination
     * @default true
     */
    showCount?: boolean;
    /**
     * Total number of rows across all pages. Falls back to data.length if not provided.
     * Useful for server-side pagination scenarios where totalRowCount may differ from data array length.
     */
    totalRowCount?: number;
    /**
     * Key that triggers data refetch when changed.
     * Useful for forcing refetch when external filters change.
     * When changed, the page index automatically resets to 0.
     */
    refreshKey?: string | number;
};
/**
 * Ref handle for DataTable component
 * @property {function} refresh - Triggers a data refetch and resets the page index to 0. Useful for manually refreshing data after external changes (e.g., after a mutation).
 */
export type DataTableRef = {
    /**
     * Triggers a data refetch and resets the page index to 0.
     * Useful for manually refreshing data after external changes (e.g., after a mutation).
     * When using controlled pagination, this will call `onPageChange(0)`.
     */
    refresh: () => void;
};
