import { ArrowRight, CheckCircle2 } from 'lucide-react'; import { match } from 'ts-pattern'; import { ExtendedDocumentStatus } from '@documenso/prisma/types/extended-document-status'; export type EmptyDocumentProps = { status: ExtendedDocumentStatus }; export default function EmptyDocumentState({ status }: EmptyDocumentProps) { const { headerText, bodyText, extraText, showArrow } = match(status) .with(ExtendedDocumentStatus.COMPLETED, () => ({ headerText: 'Nothing here', bodyText: 'There are no signed documents yet.', extraText: 'Start by adding a document', showArrow: true, })) .with(ExtendedDocumentStatus.DRAFT, () => ({ headerText: 'Nothing here', bodyText: 'There are no drafts yet.', extraText: 'Start by adding a document', showArrow: true, })) .with(ExtendedDocumentStatus.ALL, () => ({ headerText: 'Nothing here', bodyText: 'There are no documents yet.', extraText: 'Start by adding a document', showArrow: true, })) .otherwise(() => ({ headerText: 'All done', bodyText: 'All documents signed for now.', extraText: '', showArrow: false, })); return (
{bodyText}
{extraText && (
{extraText} {showArrow &&