import { TableProps } from 'antd/lib/table';
import { CSSProperties, ReactElement, ReactNode, Ref } from 'react';
import { EventEmitter } from 'ahooks/lib/useEventEmitter';
export declare type ParamType = Record<string, any>;
export declare type CcsProLayoutFormType = FormType | FormType[];
export interface FormType {
    /** label 标题 */
    label?: string;
    /** form name */
    name: string;
    /** form item element */
    value: ReactElement;
    /** 数据依赖、依赖项对应的name数组 */
    depends?: string[];
    allowClear?: boolean;
}
export interface CcsProTableProps<T> extends TableProps<T> {
    data?: TableDataType<T>;
    /** request 方法 */
    request?: Function;
    /** request 额外参数 */
    requestParam?: ParamType;
    /** table row key */
    rowKey: string;
    /** class name */
    className?: string;
    /** table 占满剩余空间、默认true */
    fillSpace?: boolean;
    /** 是否固定表头 */
    fixedThead?: boolean;
    /** useEventEmitter事件 */
    event$?: CcsProEventType;
    style?: CSSProperties;
    expandable?: any;
}
interface SearchBeforeType extends ParamType {
    query: ParamType;
}
export interface CcsProLayoutPropsType<T> {
    /** api权限标识 */
    auth?: string;
    /** 标题 */
    title?: string;
    /** 是否初始查询，默认true */
    init?: boolean;
    /** loading */
    loading?: boolean;
    /** 精简模式、适用于弹出框中使用、默认false */
    isSimple?: boolean;
    /** 查询条件集合 */
    formItems?: CcsProLayoutFormType[];
    /** 执行search 后回调函数 */
    searchEvent?: Function;
    /** 查询form 初始值 */
    formInitValues?: ParamType;
    /** 按钮 操作部分 */
    toolbar?: ReactElement;
    /** table 头部 */
    tableHeader?: ReactNode;
    /** table 数据区域 */
    table: CcsProTableProps<T>;
    /** table style */
    tableStyle?: CSSProperties;
    /** 水印文字 */
    watermark?: string;
    /** ref 回调方法 */
    proRef?: Ref<CcsProLayoutRefType>;
    /** 显示Breadcrumb */
    breadcrumb?: boolean;
    className?: string;
    style?: CSSProperties;
    /** 请求前格式化参数 */
    onSearchBefore?: (params: SearchBeforeType) => SearchBeforeType;
    /** 请求后格式化结果 */
    onSearchAfter?: (data: any) => any;
    /** 自定义查询方法 */
    onSearch?: (e: {
        query: ParamType;
        pageNo: number;
        pageSize: number;
    }) => void;
}
export interface TableDataType<T> {
    /** loading */
    loading?: boolean;
    /** 总条数 */
    totalNum?: number;
    /** 单页记录数 */
    pageSize?: number;
    /** 页码 */
    pageNo?: number;
    /** Array List 数据 */
    result?: T[];
}
export interface CcsProLayoutRefType<T = any> {
    /** 获取form表单数据 */
    formValues: Record<string, any>;
    /** 获取当前表单数据 */
    data: TableDataType<T>;
    /** 查询数据，根据条件，从第一页开始显示 */
    onSearch: () => void;
    /** 刷新数据、根据条件，当前页 */
    onReload: () => void;
    /** 重置数据，清空选择 */
    onReset: () => void;
    /** 改变data 数据 */
    onChangeData: React.Dispatch<React.SetStateAction<TableDataType<T>>>;
}
export declare type CcsProEventType = EventEmitter<{
    key: 'formFilter' | 'columnFilter';
    columnHiddenKeys?: string[];
}>;
export interface HttpResult<T = any> {
    code: number;
    success: boolean;
    data: T;
    msg: string;
}
export interface PageType<T> {
    hasNext: boolean;
    totalNum: number;
    pageNo: number;
    pageSize: number;
    result: T[];
}
export interface HttpPageResult<T = any> extends Omit<HttpResult<T>, 'data'> {
    data: PageType<T>;
}
export interface PageQueryType {
    pageNo?: number;
    pageSize?: number;
    query?: any;
}
export declare type AnyParamType = Record<string, any>;
export declare type AnyParamsType = Record<string, any>[];
export {};
