import * as React from 'react'; import type { NativeProps, RenderProp, ZestStyle } from '../types'; /** * Renders a Zest element. * * React Native adaptation of Base UI's `useRenderElement`. Differences from the web version: * - The default element is a React Native component (e.g. `View`, `Pressable`) instead of a tag name. * - There is no `data-*` attribute generation: state reaches consumers through `className`/`style` * functions, the `render` function's second argument, and each component's explicit * `accessibilityState` props. * - `style` values are merged by array composition (RN flattens arrays), never object spreading. * * @param DefaultComponent The default React Native component to render. Can be overridden by the `render` prop. * @param componentProps An object containing the `render`, `className` and `style` props. Other props are ignored. * @param params Additional parameters for rendering the element. */ export declare function useRenderElement, RenderedElementType, Enabled extends boolean | undefined = undefined>(DefaultComponent: React.ElementType | undefined, componentProps: UseRenderElementComponentProps, params?: UseRenderElementParameters): Enabled extends false ? null : React.ReactElement; export type UseRenderElementParameters = { /** * If `false`, the hook will skip most of its internal logic and return `null`. * This is useful for rendering a component conditionally. * @default true */ enabled?: Enabled | undefined; /** * The ref to apply to the rendered element. */ ref?: React.Ref | (React.Ref | undefined)[] | undefined; /** * The state of the component. */ state?: State | undefined; /** * Intrinsic props to be spread on the rendered element. */ props?: NativeProps | Array NativeProps)> | undefined; }; export interface UseRenderElementComponentProps { /** * The class name to apply to the rendered element. * Can be a string or a function that accepts the state and returns a string. * Inert in plain React Native; consumed by className-based styling solutions. */ className?: string | ((state: State) => string | undefined) | undefined; /** * The render prop or React element to override the default element. */ render?: undefined | RenderProp; /** * The style to apply to the rendered element. * Can be a React Native style or a function that accepts the state and returns one. */ style?: ZestStyle; } //# sourceMappingURL=useRenderElement.d.ts.map