import React, { ReactNode } from 'react';
import { ButtonProps } from 'antd/lib/button';
import { ModalProps } from 'antd/lib/modal';
import { Request } from '../interface';
import { CFFormProps } from './../compose-form';
import { PropTypes as BatchProps } from '../import-and-export/interface';
import { SelectUserFuncArgProps } from 'nbugs-select-user-v4.0/lib/components/select-user/interface';
import { PropTypes as SelectClassProps } from '../select-class-modal';
import { PropTypes as UploadPropTypes } from '../upload';
declare type BeforeClickOption = {
    terminate?: () => void;
};
export declare type BasePropTypes = {
    className?: string;
    text: React.ReactNode;
    uiType?: 'default' | 'link' | 'event' | 'request' | 'form' | 'selectUser' | 'selectClass' | 'a' | 'anchor' | 'upload' | 'download' | 'batch';
    confirmBeforeClick?: {
        cancelText?: string;
        centered?: boolean;
        renderClassName?: (data: any) => string;
        className?: string;
        renderContent?: (data: any) => any;
        content?: React.ReactNode;
        maskClosable?: boolean;
        okText?: string;
        okType?: 'text' | 'link' | 'ghost' | 'danger' | 'default' | 'primary' | 'dashed' | undefined;
        okButtonProps?: ButtonProps;
        cancelButtonProps?: ButtonProps;
        title?: string;
        width?: string | number;
        zIndex?: number;
        icon?: ReactNode;
    };
    onBeforeClick?(arg0: BeforeClickOption): Promise<boolean>;
    onEmit?(eventName: string, onEmit?: any): void;
    buttonProps?: ButtonProps;
    to?: any;
    additions?: any;
} & Pick<ButtonProps, 'onClick'>;
export declare type EventButtonProps = BasePropTypes & {
    eventName: string;
};
export declare type AnchorButtonProps = BasePropTypes & {
    request?: {
        url: string;
        params: any;
    };
    href?: string;
    target?: '_self' | '_parent' | '_top' | '_blank';
};
export declare type RequestButtonProps = BasePropTypes & {
    request: Request;
    loadingText?: string;
    onSuccess?: (data: any) => any;
    onError?: (error: Error) => any;
    toggleVisibility?: any;
    isVisible?: boolean;
    isBatch?: boolean;
    qrBeforeClick?: boolean;
    qrUniqueId?: any;
};
export declare type SelectUserButtonProps = RequestButtonProps & {
    selectUserProps: Omit<SelectUserFuncArgProps, 'onOk' | 'onCancel'>;
    isFamilyOrSchool?: boolean;
    selectBureauProps?: any;
    selectSchoolProps?: any;
};
export declare type LinkButtonProps = BasePropTypes & {
    to: string;
    replace?: boolean;
};
export declare type BatchButtonProps = BasePropTypes & {
    batchProps: BatchProps;
    dialogProps: ModalProps;
    onOpen?(props?: any): any;
    onCancel?(): any;
    onSuccess?(): any;
};
export declare type FormValue = any;
export declare type FormButtonProps = BasePropTypes & {
    request: Request;
    dialogProps: ModalProps;
    formItemLayout?: any;
    formProps: {
        className?: string;
        value?: FormValue;
        dataSource: Array<{
            uiType: string;
            label: string;
            name?: string;
            props?: any;
            rules?: any;
        }>;
    } & Omit<CFFormProps, 'controls' | 'actions' | 'request'>;
    comsMap?: {
        [uiType: string]: React.Component;
    };
    noContainer: boolean;
    onSuccess?(formValue: FormValue): any;
    onOpen?(): any;
    onCancel?(): any;
    onOk?(formValue: FormValue): any;
    onChange?(formValue: FormValue): any;
    onRequestFailed?(error: any, formValue: FormValue): any;
    onValidateFailed?(error: any): any;
};
export declare type SelectClassButtonProps = Omit<SelectUserButtonProps, 'selectUserProps'> & SelectClassProps;
export declare type UploadButtonProps = RequestButtonProps & {
    uploadProps: Omit<UploadPropTypes, 'request'>;
    request: UploadPropTypes['request'];
};
export declare type ToggleProps = BasePropTypes & {
    toggleVis?: any;
    isVisible?: boolean;
};
export declare type PropTypes = BasePropTypes | EventButtonProps | RequestButtonProps | FormButtonProps | LinkButtonProps | SelectUserButtonProps | SelectClassButtonProps | AnchorButtonProps | BatchButtonProps | UploadButtonProps;
export {};
