import { default as React } from 'react'; import { ActiveFilterProps } from '../../SortColumn/SortColumn'; import { TextInputNumber } from '../../Form/TextInput'; import { SelectDisplayOption } from '../../Selects/SelectDisplay/SelectDisplay'; export type FilterOptions = { id: number; text: string; value: string; }; type optionsFilterHeader = SelectDisplayOption & { type?: 'currency' | 'percentage'; }; type ColumnFilterType = { /** The array of options to be displayed in the picker */ filterOptions?: FilterOptions[]; /** Optional callback triggers when any change occurs in the toggle options or on input change */ columnFilterCallback?: (activeFilter: ActiveFilterProps) => void; /** Unique column key to perform the sort */ tableKey: string; /** Optional suffix added to the values */ suffix?: string; /** Optional prefix added to the values */ prefix?: string; /** Optional props for the text input */ textInputProps?: TextInputNumber; options?: optionsFilterHeader[]; /** Optionally enable filtering by sub-metrics (the change values) */ enableFilterByChangeValues?: boolean; /** SetStateAction to set the input value */ setInputValue: React.Dispatch>; /** SetStateAction to set the currently selected filter column data */ setColumnFilterData: React.Dispatch>; /** Optional object to display the default selected filter values */ defaultFilter?: { selectedFilterOption: FilterOptions; value: number | string; }; /** The currently selected filter option*/ selectedFilterOption?: optionsFilterHeader; /** SetStateAction to set the currently selected filter option*/ setSelectedFilterOption: React.Dispatch>; /** Default label to the filter input. */ headerText: string; setVisible?: React.Dispatch>; /** Optional prop to add a test id to the ColumnFilter for QA testing */ qaTestId?: string; }; declare const ColumnFilter: ({ tableKey, prefix, suffix, filterOptions, columnFilterCallback, textInputProps, setInputValue, setColumnFilterData, defaultFilter, enableFilterByChangeValues, options, headerText, selectedFilterOption, setSelectedFilterOption, setVisible, qaTestId, }: ColumnFilterType) => React.JSX.Element; export default ColumnFilter;