import React from 'react';
import { observer } from 'mobx-react-lite';
import { useRenderItem } from './useRenderItem';
import { useRenderFolderItem } from './renderFolderItem';
import { GridFoldersFolderSection } from './GridFoldersFolderSection';
import { GridFoldersItemsSection } from './GridFoldersItemsSection';
import { GridFoldersLoadingSection } from './GridFoldersLoadingSection';
function _GridFoldersSectionsGroup(props) {
    const { state, itemsSectionTitle, foldersSectionTitle } = props;
    const renderItem = useRenderItem({
        ...props,
        state: state.items,
    });
    const renderFolderItem = useRenderFolderItem({
        ...props,
        state: state.folders,
    });
    const { showLoadingSection } = state;
    return showLoadingSection ? (React.createElement(GridFoldersLoadingSection, { state: state })) : (React.createElement(React.Fragment, null,
        state.showFoldersSection && (React.createElement(GridFoldersFolderSection, { state: state, sectionTitle: foldersSectionTitle, renderItem: renderFolderItem })),
        state.showItemsSection && (React.createElement(GridFoldersItemsSection, { state: state, renderItem: renderItem, sectionTitle: itemsSectionTitle }))));
}
export const GridFoldersSectionsGroup = observer(_GridFoldersSectionsGroup);
//# sourceMappingURL=GridFoldersSectionsGroup.js.map