import { GridSectionHeader } from './GridSectionHeader';
import { VirtualGridRepeater } from '../VirtualGridRepeater/VirtualGridRepeater';
import { PageGridInfiniteScrollLoader } from '../PageGridInfiniteScrollLoader';
import React from 'react';
import { observer } from 'mobx-react-lite';
import { GridFoldersSection } from './GridFoldersSection';
import { InitialSkeletonLoader } from '../InitialLoader/InitialSkeletonLoader';
function _GridFoldersItemsSection({ state, renderItem, sectionTitle, }) {
    const { container: { translate: t }, toolbar, items: { collection: { showRefreshLoader }, }, } = state;
    return (React.createElement(GridFoldersSection, { state: state.items, dataHook: "items-section", header: state.showItemsSectionHeader && (React.createElement(GridSectionHeader, { state: toolbar, sectionTitle: sectionTitle ?? t('section.header.items') })) },
        React.createElement(VirtualGridRepeater, { renderItem: renderItem, gridState: state.items }),
        showRefreshLoader && (React.createElement(InitialSkeletonLoader, { dataHook: "refresh-loader", state: state.items })),
        React.createElement(PageGridInfiniteScrollLoader, { dataHook: "items-infinite-scroll-loader", state: state.items, scrollMoreAlways: true })));
}
export const GridFoldersItemsSection = observer(_GridFoldersItemsSection);
//# sourceMappingURL=GridFoldersItemsSection.js.map