import * as React from "react";
import { type ReactNode } from "react";
import { type SortingState, type OnChangeFn } from "@tanstack/react-table";
import type { TColumn, TFilterItem, TAdvancedFilterItem, TFilters } from "./types";
interface ISearchProps {
    placeholder?: string;
    hidden?: boolean;
    onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
    value?: string;
    /**
     * Props to control the onSearch function debounceTime
     */
    debounceTime?: number;
    /**
     * Attach the debounced search function
     */
    onSearch?: (value: string) => void;
}
interface IPaginationProps {
    onPageSizeChange?: (args: number) => void;
    onPageChange?: (args: number) => void;
    totalRecords?: number;
    offset?: number;
    pageSize?: number;
}
export interface IDataTableProps<T> {
    /**
     * Defines the column structure for the Data Table, including column headers,
     * accessors, and any additional configurations.
     */
    columns: TColumn[];
    /**
     * The array of data objects that will populate the rows of the Data Table.
     */
    data: T[];
    /**
     * Optional: Provide custom class names as a space-separated
     * string to override the default Data Table styling.
     */
    className?: string;
    /**
     * Configuration for applying advanced filters to the Data Table.
     * Allows complex filtering logic and customization.
     */
    advancedFilters?: TAdvancedFilterItem[];
    /**
     * Configuration for applying basic filters to the Data Table.
     * Enables simple filtering by key-value pairs.
     * Showing maximum 3 basic filters in the table.
     */
    basicFilters?: TFilterItem[];
    /**
     * Allows to set filters by key-value pairs.
     */
    filters?: TFilters;
    /**
     * A callback function used to update the list of applied filters.
     */
    setFilters?: (filters: TFilters) => void;
    /**
     * Boolean value to display a loading state in the Data Table,
     * typically while loading or processing data.
     * @default false
     */
    loading?: boolean;
    /**
     * A callback function triggered to refresh the Data Table,
     * typically re-fetching or updating the data.
     */
    onRefresh?: () => void;
    /**
     * To adjust the width of the columns
     * @default false
     */
    resizable?: boolean;
    /**
     * To adding virtualization for column in the data table
     * @default true
     */
    columnVirtualization?: boolean;
    /**
     * To adding virtualization for row in the data table
     * @default true
     */
    rowVirtualization?: boolean;
    /**
     * To pin the first columns of the data table
     * @default true
     */
    pinnedFirstColumn?: boolean;
    /**
     * To make the row selectable by showing checkboxes
     * @default false
     */
    selectable?: boolean;
    /**
     * Callback function triggered on row selection.
     * @param selectedRows - Index List of the selected rows
     */
    onRowSelection?: (selectedRows: object) => void;
    /**
     * Allows to set sort by using key-value pair.
     */
    sorting?: SortingState;
    /**
     * Callback function triggered on row sorting.
     * @param sortState - Index List of the selected rows
     */
    setSorting?: OnChangeFn<SortingState> | undefined;
    /**
     * Allows to set pagination props.
     */
    paginationProps?: IPaginationProps;
    /**
     * To Adjust the height of the table.
     * @default 100%
     */
    height?: string;
    /**
     * To set the page size option
     * @default PAGE_SIZE_OPTIONS
     */
    pageSizeOptions?: number[];
    /**
     * To add the custom CTAs
     */
    customCTAs?: ReactNode;
    /**
     * Callback function triggered on change of Column Preferences.
     * @param columns - columns array with updated order and selected key value
     */
    setColumns: (columns: TColumn[]) => void;
    /**
     * Allows to set search textfield props.
     */
    searchProps?: ISearchProps;
}
/**
 * DataTable is a powerful component that displays tabular data with advanced features
 * like filtering, sorting, pagination, and row selection.
 */
export declare const DataTable: <T extends object>({ advancedFilters, basicFilters, className, columns, data, filters, loading, paginationProps, resizable, selectable, pinnedFirstColumn, rowVirtualization, columnVirtualization, sorting, height, customCTAs, searchProps, pageSizeOptions, setFilters, setSorting, onRefresh, onRowSelection, setColumns }: IDataTableProps<T>) => ReactNode;
export {};
