import React, { FormEvent } from 'react';
import { BUTTON_ICON_POSITION, BUTTON_VARIANT } from './constants';
import { ComponentWithClass } from '../../common/ComponentWithClass';
import { ComponentSizeType } from '../Forms';
import { ValueOf } from '../../helpers';
export type ButtonVariantType = ValueOf<typeof BUTTON_VARIANT>;
export type ButtonIconPositionType = ValueOf<typeof BUTTON_ICON_POSITION>;
interface ButtonBaseProps extends Omit<ComponentWithClass, 'children'> {
    /**
     * Position of the optional icon.
     */
    iconPosition?: ButtonIconPositionType;
    /**
     * Toggles whether the component is disabled or not (preventing user
     * interaction).
     */
    isDisabled?: boolean;
    /**
     * Whether an operation is in progress and the button temporarily can't be
     * used. If set, the button will be disabled and a loading icon displayed in
     * place of the button text.
     */
    isLoading?: boolean;
    /**
     * Optional handler called when the component is clicked.
     */
    onClick?: (event: FormEvent<HTMLButtonElement>) => void;
    /**
     * Size of the component.
     */
    size?: ComponentSizeType;
    /**
     * HTML type of the component (forms should use the `submit` type).
     */
    type?: 'button' | 'submit';
    /**
     * Type of component to display (style varies accordingly).
     */
    variant?: ButtonVariantType;
}
export interface ButtonWithTextProps extends ButtonBaseProps {
    /**
     * Text to display within the component.
     */
    children: string;
    /**
     * Optional icon to display beside the component text.
     */
    icon?: React.ReactNode;
    /**
     * Value for the HTML title attribute. Should be set for
     * icon-only buttons to make them accessible.
     */
    title?: string;
}
export interface ButtonWithIconOnlyProps extends ButtonBaseProps {
    children?: never;
    icon: React.ReactNode;
    title: string;
}
export type ButtonProps = ButtonWithTextProps | ButtonWithIconOnlyProps;
export declare const Button: React.FC<ButtonProps>;
export {};
//# sourceMappingURL=Button.d.ts.map