import React from 'react'; import { observer } from 'mobx-react-lite'; import { AddItemEmptyState } from '../Illustration/AddItemEmptyState'; import { useWixPatternsContainer } from '@wix/bex-core/react'; import { EmptyStateBase, EmptyStateBaseProps } from './EmptyStateBase'; import { NewItemButton, NewItemButtonProps } from './NewItemButton'; export interface CollectionEmptyStateProps extends Omit, 'cta'> { /** * Configuration for the default call to action button.\ * `onClick`: Adds a callback for when the button is clicked.
* `text`: Text of the button. * To render the default add new item button, you must provide the `onClick` callback. * @external */ addNewCta?: NewItemButtonProps; } function _CollectionEmptyState(props: CollectionEmptyStateProps) { const { translate: t } = useWixPatternsContainer(); const { addNewCta } = props; return ( } {...props} cta={addNewCta && } /> ); } export const CollectionEmptyState = observer(_CollectionEmptyState);