import { ComponentPropsWithoutRef, ContextType, ElementType, ReactNode } from 'react';
import { ButtonOrLinkContext, ButtonOrLinkProps } from './ButtonOrLink';
export declare namespace MaybeButtonOrLinkProps {
    interface BaseProps {
        /** @default "span" */
        defaultAs?: ElementType;
    }
    interface ButtonProps extends BaseProps, ButtonOrLinkProps.ButtonProps {
        as?: never;
        onClick: NonNullable<ButtonOrLinkProps.ButtonProps['onClick']>;
    }
    interface ExternalLinkProps extends BaseProps, ButtonOrLinkProps.ExternalLinkProps {
        as?: never;
    }
    interface ClientLinkProps extends BaseProps, ButtonOrLinkProps.ClientLinkProps {
        as?: never;
    }
    interface OtherElementProps extends BaseProps, Omit<ComponentPropsWithoutRef<'span'>, 'onClick'> {
        as?: ElementType;
        href?: never;
        target?: never;
        type?: never;
        onClick?: ButtonOrLinkProps.ButtonProps['onClick'];
    }
}
export type MaybeButtonOrLinkProps = MaybeButtonOrLinkProps.ButtonProps | MaybeButtonOrLinkProps.ExternalLinkProps | MaybeButtonOrLinkProps.ClientLinkProps | MaybeButtonOrLinkProps.OtherElementProps;
/**
 * Renders a `ButtonOrLink` if one of `href` or `onClick` is passed along with no `as`.
 * Otherwise, renders the element type passed in `as` (defaulting to `defaultAs`).
 */
export declare const MaybeButtonOrLink: import('react').ForwardRefExoticComponent<Omit<MaybeButtonOrLinkProps, "children"> & {
    children?: ReactNode | ((context: ContextType<typeof ButtonOrLinkContext>) => ReactNode);
} & import('react').RefAttributes<HTMLElement>>;
//# sourceMappingURL=MaybeButtonOrLink.d.ts.map