import React from 'react';
import { ButtonProps } from '../Button';
import { ModalProps } from '../Modals/Modal.js';
import { ActionModalProps } from '../Modals/ActionModal.js';
type WithElement = {
    modalComponent?: never;
    /** You can either use one of our Modals or a function accepting the closeHandler. If you are using a Modal element, do not add `closeHandler` to it, it will be provided by ButtonWithModal.  */
    modalElement: React.ReactElement<ModalProps | ActionModalProps> | (({ closeHandler }: {
        closeHandler: () => void;
    }) => React.ReactNode);
};
type WithComponent = {
    modalComponent: React.ComponentType<{
        closeHandler: () => void;
    }>;
    modalElement?: never;
};
export type ButtonWithModalProps = ButtonProps & {
    /** Optional callback when clicked */
    onClick?: () => void;
    /** Optional callback when modal closed */
    onClose?: () => void;
} & (WithElement | WithComponent);
declare function ButtonWithModal({ children, modalComponent: ModalComponent, modalElement, onClick, onClose, ...buttonProps }: ButtonWithModalProps): React.JSX.Element;
export { ButtonWithModal };
