'use client';
import { useRender } from '@base-ui/react/use-render';
import { objectFromEntries } from 'ts-extras';
/**
 * A utility component that provides polymorphic rendering capabilities. It can render as any HTML
 * element or React component.
 */
export function Render({ render, state, ...props }) {
    return useRender({
        render,
        state: state !== undefined ? state : undefined,
        props,
        // Do not automatically add data attributes for state properties
        stateAttributesMapping: objectFromEntries(Object.keys(state ?? {}).map((stateProperty) => [stateProperty, () => null])),
    });
}
//# sourceMappingURL=Render.js.map