import React from 'react';
import { RenderItem } from './RenderItem';
import { GridState } from './GridState';
import { VirtualGridRepeaterBase } from './VirtualGridRepeaterBase';
import { VirtualGridItem } from './VirtualGridItem';
import { GridForceRenderIndexes } from './GridForceRenderIndexes';

export interface VirtualGridRepeaterProps {
  gridState: GridState;
  renderItem: RenderItem;
}

export function VirtualGridRepeater(props: VirtualGridRepeaterProps) {
  return (
    <VirtualGridRepeaterBase
      innerElementType={GridForceRenderIndexes}
      {...props}
    >
      {VirtualGridItem}
    </VirtualGridRepeaterBase>
  );
}
