import type * as React from "react";
declare type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
/**
 * Infers `OwnProps` if E is a ForwardRefComponent
 */
declare type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
/**
 * Infers the JSX.IntrinsicElement if E is a ForwardRefComponent
 */
declare type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
declare type NarrowIntrinsic<E> = E extends keyof JSX.IntrinsicElements ? E : never;
declare type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
    as?: E;
}>>;
/**
 * Extends original type to ensure built in React types play nice with
 * polymorphic components still e.g. `React.ElementRef` etc.
 */
interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
    <As extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any> = NarrowIntrinsic<IntrinsicElementString>>(props: As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
        as: As;
    }> : As extends React.JSXElementConstructor<infer P> ? Merge<P, OwnProps & {
        as: As;
    }> : never): React.ReactElement | null;
}
interface MemoComponent<IntrinsicElementString, OwnProps = {}> extends React.MemoExoticComponent<ForwardRefComponent<IntrinsicElementString, OwnProps>> {
    <As extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any> = NarrowIntrinsic<IntrinsicElementString>>(props: As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
        as: As;
    }> : As extends React.JSXElementConstructor<infer P> ? Merge<P, OwnProps & {
        as: As;
    }> : never): React.ReactElement | null;
}
export type { ForwardRefComponent, IntrinsicElement, MemoComponent, Merge, OwnProps, };
declare const _default: {};
export default _default;
