${randomBody()}
`, + isHtml: true, + attachments: [], + read: randomReadStatus(), + }); + + mocks.notificationEmails.push({ + id: uuidv4(), + from: { + email: 'no-reply@system.com', + name: randomName(), + avatar: randomAvatar(), + }, + to: generateRandomRecipients(2), + subject: randomSubject(), + body: randomBody(), + timestamp: new Date( + Math.floor(Math.random() * (2023 - 2021 + 1) + 2021), + Math.floor(Math.random() * 12), + Math.floor(Math.random() * 28), + Math.floor(Math.random() * 24), + Math.floor(Math.random() * 60), + ).toISOString(), + attachments: [], + read: randomReadStatus(), + }); + + mocks.emailsWithLongBody.push({ + id: uuidv4(), + from: { + email: randomEmail(), + name: randomName(), + avatar: randomAvatar(), + }, + to: generateRandomRecipients(3), + subject: randomSubject(), + body: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. '.repeat(50), + attachments: [], + read: randomReadStatus(), + }); + } + + return mocks; +}; + +export const emailMocks = generateMocks(); + +/** + * Updates the 'read' status of an email by its ID. + * @param mocks - The collection of email mocks. + * @param id - The ID of the email to update. + * @param newReadStatus - The new value for the 'read' field. + * @returns The updated email, or null if not found. + */ +export const updateEmailReadStatus = ( + mocks: Record{title}
+To
+ +Subject
+ +Arial
+14px
+{from.name}
+To:
+{email.name.split(' ')[0]}
+ {hoveredIndex === index && ( +Cc:
+{email.name.split(' ')[0]}
+ {hoveredIndex === index + to.length && ( +{formatTimestamp(timestamp as string)}
+{subject}
+{body}
+{newMessagesCount}
+Unread messages
+Click any email to preview
+You’re all set!
+There are no unread messages
+2.8 GB
+/
+4 GB
+Inbox
+{to[0].name}
+{to[0].email}
+