import React from 'react'; import { observer } from 'mobx-react-lite'; import { PlaceholderStatesBase } from '../PlaceholderStates/PlaceholderStatesBase'; import { ToolbarCollectionState } from '../../state'; import { ToolbarCollectionBaseProps } from '../ToolbarCollection'; import { FiltersMap } from '@wix/bex-core'; export interface GridPlaceholderStatesProps extends ToolbarCollectionBaseProps { state: ToolbarCollectionState; } function _GridPlaceholderStates( props: GridPlaceholderStatesProps, ) { const { state, emptyState, noResultsState, errorState, children } = props; const { collection } = state; return ( { const { result: { originQuery, hasAvailableItems }, } = collection; return noResultsState({ hasAvailableItems, query: originQuery, }); } : noResultsState } errorState={errorState} loadingState={null} > {children} ); } export const GridPlaceholderStates = observer(_GridPlaceholderStates);