import React, { forwardRef } from 'react';
import { useVirtualGridRepeaterContext } from './VirtualGridRepeaterContext';
import { VirtualGridItem } from './VirtualGridItem';
import { ForceRenderIndexesObserver } from './ForceRenderIndexes';
export const GridForceRenderIndexes = forwardRef(({ children, ...props }, ref) => {
    const { state } = useVirtualGridRepeaterContext();
    return (React.createElement(ForceRenderIndexesObserver, { ItemElementType: VirtualGridItem, contentsWrapper: ({ contents, listAttributes }) => (React.createElement("div", { "data-hook": "virtual-inner-element", "data-count": state.gridState.itemsToRenderCount, ref: (el) => {
                if (typeof ref === 'function') {
                    ref(el);
                }
                else if (ref) {
                    ref.current = el;
                }
                state.innerElement = el;
            }, ...listAttributes, ...props }, contents)) }, children));
});
//# sourceMappingURL=GridForceRenderIndexes.js.map