import * as React from 'react'; import { FormContextProps } from '../form/FormContext'; import { SubmitProps } from '../submit'; import { Omit } from '../utils/Typescript'; export declare enum DynamicSubmitMode { Normal = 0, Submitting = 1, Error = 2, Success = 3 } export type DynamicSubmitProps = Omit & { onClick?: (e: React.MouseEvent, submitting: () => void, error: () => void, success: () => void, reset: () => void) => void; submittingChildren?: JSX.Element | string; errorChildren?: JSX.Element | string; successChildren?: JSX.Element | string; submittingClassName?: string; errorClassName?: string; successClassName?: string; normalClassName?: string; submitDisablesInputs?: boolean; resetEnablesInputs?: boolean; } & FormContextProps; export interface DynamicSubmitState { buttonState: DynamicSubmitMode; } export declare class DynamicSubmitRaw extends React.PureComponent { static defaultProps: { validateForm: boolean; submitDisablesInputs: boolean; resetEnablesInputs: boolean; }; constructor(props: DynamicSubmitProps); render(): React.JSX.Element; private handleClick; private submitting; private error; private success; private reset; private renderChildren; private renderClassName; } export declare const DynamicSubmit: React.ForwardRefExoticComponent & { onClick?: (e: React.MouseEvent, submitting: () => void, error: () => void, success: () => void, reset: () => void) => void; submittingChildren?: JSX.Element | string; errorChildren?: JSX.Element | string; successChildren?: JSX.Element | string; submittingClassName?: string; errorClassName?: string; successClassName?: string; normalClassName?: string; submitDisablesInputs?: boolean; resetEnablesInputs?: boolean; } & FormContextProps & React.RefAttributes>; export default DynamicSubmit;