import { BaseContext, GridCell } from '../types';
/**
 * Options for configuring Quick Search
 */
export interface QuickSearchOptions<TData = any> {
    /**
     * Determines whether Quick Search should be applied to a given cell
     *
     * @param quickSearchContext Contains quick search text and current Grid Cell
     */
    isCellSearchable?: (quickSearchContext: QuickSearchContext) => boolean;
    /**
     * Allows a different value to be used for a cell when searching (instead of its raw value)
     */
    getCellSearchText?: (quickSearchContext: QuickSearchContext) => string | null;
    /**
     * Value to use as placeholder in QuickSearch controls (e.g. in Dashboard)
     *
     * @defaultValue 'Search'
     * @gridInfoItem
     */
    quickSearchPlaceholder?: string;
    /**
     * Clears saved searches when AdapTable loads
     *
     * @defaultValue false
     * @gridInfoItem
     */
    clearQuickSearchOnStartUp?: boolean;
    /**
     * Filters Grid after quick search so only matching rows are displayed
     *
     * @defaultValue false
     * @gridInfoItem
     * @noCodeItem
     */
    filterGridAfterQuickSearch?: boolean;
    /**
     * Run Quick Search using Case Sensitivity
     *
     * @defaultValue false
     * @gridInfoItem
     * @noCodeItem
     */
    isQuickSearchCaseSensitive?: boolean;
}
/**
 * Context used when applying Quick Search in bespoke fashion
 */
export interface QuickSearchContext extends BaseContext {
    /**
     * Cell being checked
     */
    gridCell: GridCell;
    /**
     * Current Quick Search Text
     */
    quickSearchValue: string;
}
