import React, { ElementType, ReactElement, ReactNode } from 'react';
import { ButtonProps as ChakraButtonProps, ResponsiveValue } from '@chakra-ui/react';
type Overwrite<T, NewT> = Omit<T, keyof NewT> & NewT;
type Never<Source> = {
    [P in keyof Source]?: never;
};
type LinkButton = {
    href?: string;
    isExternal?: boolean;
    rel?: string;
};
type IconButton = {
    ariaLabel: string;
    icon: ReactElement;
};
type ButtonSize = 'md' | 'lg';
type SharedProps = {
    as?: 'button';
    variant?: 'primary' | 'secondary' | 'success' | 'transparent';
    size?: ButtonSize | ResponsiveValue<ButtonSize>;
    children: ReactNode;
    leftIcon?: ReactElement;
    rightIcon?: ReactElement;
    onClick?: ChakraButtonProps['onClick'];
} & Omit<ChakraButtonProps, 'backgroundColor' | 'background' | 'color' | 'textColor' | 'border' | 'textStyle'> & Never<LinkButton> & Never<IconButton>;
type SubmitType = Overwrite<SharedProps, {
    type: 'submit';
}>;
type ButtonType = Overwrite<SharedProps, {
    type?: 'button';
    onClick: Exclude<ChakraButtonProps['onClick'], undefined>;
}>;
export type ButtonProps = SubmitType | ButtonType;
type LinkProps = Overwrite<SharedProps, LinkButton & {
    as: ElementType;
    isDisabled?: false;
}>;
type IconProps = IconButton & Never<Pick<SharedProps, 'leftIcon' | 'rightIcon' | 'children'>>;
type IconButtonProps = Overwrite<ButtonType, IconProps> | Overwrite<SubmitType, IconProps> | Overwrite<LinkProps, IconProps>;
export type Props = ButtonProps | IconButtonProps | LinkProps;
declare const Button: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLLinkElement | HTMLButtonElement>>;
export default Button;
//# sourceMappingURL=index.d.ts.map