/**
 * 表格列过滤，参考https://2x.antdv.com/components/table-cn
 */
export interface FilterColumn<T = unknown> {
    key: string,
    filteredValue: string[],
    onFilter: (value: string, record: T) => boolean
}

/**
 * 过滤选择框
 */
export interface FilterSelect<T = unknown> {
    key: keyof T,
    alias?: string, // key的别名，查询字段名可能和key不一样
    selectedValue: string | number,
    options: {
        label: string,
        value: string | number,
    }[],
    onChange?: (value: string | number) => void
}

/**
 * 过滤输入框
 */
export interface FilterInput<T = unknown> {
    keys: (keyof T)[],
    alias?: string, // key的别名，查询字段名可能和key不一样
    value: string,
    placeholder: string
}

export interface FilterButton {
    lable: string;
    event: () => void;
    className?: string;
}