import { ElementType, ReactElement, Ref } from 'react'; import { Props, XOR, __, Expand } from '../types.js'; export declare enum Features { /** No features at all */ None = 0, /** * When used, this will allow us to use one of the render strategies. * * **The render strategies are:** * - **Unmount** _(Will unmount the component.)_ * - **Hidden** _(Will hide the component using the [hidden] attribute.)_ */ RenderStrategy = 1, /** * When used, this will allow the user of our component to be in control. This can be used when * you want to transition based on some state. */ Static = 2 } export declare enum RenderStrategy { Unmount = 0, Hidden = 1 } type PropsForFeature = { [P in TPassedInFeatures]: P extends TForFeature ? TProps : __; }[TPassedInFeatures]; export type PropsForFeatures = XOR, PropsForFeature>; export declare function render({ ourProps, theirProps, slot, defaultTag, features, visible, name, }: { ourProps: Expand & PropsForFeatures> & { ref?: Ref; }; theirProps: Expand>; slot?: TSlot; defaultTag: ElementType; features?: TFeature; visible?: boolean; name: string; }): ReactElement> | null; export type HasDisplayName = { displayName: string; }; export type RefProp = T extends (props: any, ref: Ref) => any ? { ref?: Ref; } : never; /** * This is a hack, but basically we want to keep the full 'API' of the component, but we do want to * wrap it in a forwardRef so that we _can_ passthrough the ref */ export declare function forwardRefWithAs(component: T): T & { displayName: string; }; export declare function compact>(object: T): {} & T; export {};