import React from 'react'; import { Button, Layer, Tile } from '@carbon/react'; import { useLayoutType } from '@openmrs/esm-react-utils'; import { getCoreTranslation } from '@openmrs/esm-translations'; import { CardHeader } from '../cards'; import styles from './empty-card.module.scss'; export interface EmptyCardProps { /** The name of the type of item that would be displayed here if not empty. This must be a pre-translated string. */ displayText: string; /** The title to use for this empty component. This must be a pre-translated string. */ headerTitle: string; /** A callback to invoke when the user tries to record a new item. */ launchForm?(): void; } export const EmptyCardIllustration = ({ width = '64', height = '64' }) => { return ( ); }; /** * Re-usable card for displaying an empty state */ export const EmptyCard: React.FC = (props) => { const isTablet = useLayoutType() === 'tablet'; const launchForm = props.launchForm; return (

{getCoreTranslation('emptyStateText', 'There are no {{displayText}} to display', { displayText: props.displayText, })}

{launchForm && ( )}

); };