import React from 'react'; import type { ComponentPropsWithRef, ElementType, ComponentPropsWithoutRef } from 'react'; declare const defaultElement = "div"; export type PolymorphicComponentPropsWithRef = Props & { as?: As; } & Omit, keyof Props>; export type PolymorphicComponentPropsWithoutRef = Props & { as?: As; } & Omit, keyof Props>; export type PolymorphicComponentRef = ComponentPropsWithRef['ref']; type ComponentWithAs = (props: PolymorphicComponentPropsWithRef) => React.ReactElement | null; export type PolymorphicComponentWithRef = ComponentWithAs & { displayName?: string | undefined; }; type ForwardRefWithAs = (props: PolymorphicComponentPropsWithRef, ref: PolymorphicComponentRef) => React.ReactElement | null; export declare function polymorphicComponentWithRef(baseComponent: ForwardRefWithAs): PolymorphicComponentWithRef; export {};