import * as React from 'react';
/**
* The `render` seam's type: an element, or a function returning one.
*
* `S` is the component's own state, passed to the function form so a caller can branch on it —
* `render={(props, { isActive }) => }`.
*/
export type RenderProp> = React.ReactElement> | ((props: Record, state: S) => React.ReactElement);
/**
* Resolve a `render` prop into an element.
*
* **One helper rather than seven copies.** Every Strix `render` seam previously accepted an element
* and called `cloneElement` itself, which meant seven places to keep in step and seven chances for
* the merge order to drift. Adding the function form to each independently would have made that
* worse, so the behaviour lives here and the components pass their own props and state in.
*
* **The two forms are not the same contract, deliberately, because Base UI's are not:**
*
* - **Element** — `render={}`. Cloned, with the component's props merged in and the
* element's own `className` merged LAST so a caller's utility still beats the component's role.
* Children fall back to the element's own, so `render={Inner}` works.
* - **Function** — `render={(props) => }`. Called, and the result is used AS IS.
* The function receives the props it is expected to spread and owns the element completely; that
* is the point of the form — full control, including where the props land and what wraps what.
* Nothing is merged in afterwards, because doing so would silently overrule the function.
*
* That asymmetry is the whole reason to have both. The element form is the short path and does the
* merging for you; the function form hands over the decision.
*
* **Neither form can be created in a React Server Component**, and the guard below is the only
* reason that fails legibly. All six consumers of this helper are client components, so a server
* component may render them — but an *element* passed as a prop across that boundary is serialized
* by the Flight protocol and arrives on the client as a `React.lazy` wrapper, not as an element:
* `$$typeof` is `Symbol(react.lazy)` and there is no `props` object at all. The function form is
* worse still, because a function is not serializable in the first place.
*
* **The server pass succeeds, which is what makes this dangerous.** During SSR `render` is a real
* element, so the HTML is correct and complete; the failure is at hydration, where React unmounts
* the whole tree. `apps/demo`'s `sidebar-07` page was found this way — `demo:smoke` asserted the
* served HTML and was green while the page was blank in a browser. Without the guard the message is
* `Cannot read properties of undefined (reading 'className')` from a minified chunk, which names
* neither the boundary nor the prop.
*/
export declare function resolveRender(render: RenderProp, props: Record, state: S, children?: React.ReactNode): React.ReactElement;
//# sourceMappingURL=render-seam.d.ts.map