import { AxiosPromise } from 'axios';

export interface tableTypes<T, K> {
    queryParams?: T,
    tableColumn: columnTypes<K>[],
    listFn?: (params: PageQuery & T) => AxiosPromise<{ records: K[] }>,
    delFn?: (params: string | number) => AxiosPromise<any>,
    keyId?: string,
    importCode?: string,
    exportCode?: string,
    cloumnCode?: string,
    importType?: string,
    menuId?: any,
    selectableKey?: string,
    selectableValue?: string,
    commonQueryOrderBy?: string,
    sortMethod?: string
}

export interface columnTypes<T = any> {
    show: boolean,
    label: string,
    prop: string,
    width?: string | number,
    sortable?: boolean | 'custom',
    disabledMove?: boolean,
    render?: ({ column, index }: { column: T, index: number }) => any,
    headerQuestionFilled?: { content: string, width: number },
    toFixed?: boolean,
    showOverflowTooltip?: boolean
}
