import React from 'react';
import { observer } from 'mobx-react-lite';
import { PlaceholderStatesBase } from '../PlaceholderStates/PlaceholderStatesBase';
function _GridPlaceholderStates(props) {
    const { state, emptyState, noResultsState, errorState, children } = props;
    const { collection } = state;
    return (React.createElement(PlaceholderStatesBase, { state: state.multi, emptyState: emptyState, noResultsState: typeof noResultsState === 'function'
            ? () => {
                const { result: { originQuery, hasAvailableItems }, } = collection;
                return noResultsState({
                    hasAvailableItems,
                    query: originQuery,
                });
            }
            : noResultsState, errorState: errorState, loadingState: null }, children));
}
export const GridPlaceholderStates = observer(_GridPlaceholderStates);
//# sourceMappingURL=GridPlaceholderStates.js.map