import { AnyObject } from "../../../_util/type.js";
import { devUseWarning } from "../../../_util/warning.js";
import { ColumnType, ColumnsType, FilterDropdownProps, FilterKey, FilterValue, GetPopupContainer, Key, TableLocale, TransformColumns } from "../../interface.js";
import { flattenKeys } from "./FilterDropdown.js";
import { Ref } from "vue";

//#region src/table/hooks/useFilter/index.d.ts
interface FilterState<RecordType = AnyObject> {
  column: ColumnType<RecordType>;
  key: Key;
  filteredKeys?: FilterKey;
  forceFiltered?: boolean;
}
declare function collectFilterStates<RecordType extends AnyObject = AnyObject>(columns: ColumnsType<RecordType>, init: boolean, pos?: string): FilterState<RecordType>[];
declare function generateFilterInfo<RecordType extends AnyObject = AnyObject>(filterStates: FilterState<RecordType>[]): Record<string, FilterValue | null>;
declare function getFilterData<RecordType extends AnyObject = AnyObject>(data: RecordType[], filterStates: FilterState<RecordType>[], childrenColumnName: string): RecordType[];
interface FilterConfig<RecordType = AnyObject> {
  prefixCls: string;
  dropdownPrefixCls: string;
  mergedFilterStates: FilterState<RecordType>[];
  filterStates: Ref<FilterState<RecordType>[]>;
  locale: TableLocale;
  filterDropdown?: (ctx: FilterDropdownProps & {
    column: ColumnType<RecordType>;
  }) => any;
  filterIcon?: (ctx: {
    column: ColumnType<RecordType>;
    filtered: boolean;
  }) => any;
  onFilterChange: (filters: Record<string, FilterValue | null>, filterStates: FilterState<RecordType>[]) => void;
  getPopupContainer?: GetPopupContainer;
  rootClassName?: string;
}
declare function getMergedFilterStates<RecordType extends AnyObject = AnyObject>(rawMergedColumns: ColumnsType<RecordType>, filterStates: FilterState<RecordType>[], warning?: ReturnType<typeof devUseWarning>): FilterState<RecordType>[];
declare function useFilter<RecordType extends AnyObject = AnyObject>(props: FilterConfig<RecordType>): readonly [TransformColumns<RecordType>, FilterState<RecordType>[], Record<string, FilterValue | null>];
//#endregion
export { FilterConfig, FilterState, collectFilterStates, useFilter as default, flattenKeys, generateFilterInfo, getFilterData, getMergedFilterStates };