function formatNumber(number) { return number.toLocaleString(); } const iff = (cond, yes, no) => (cond ? yes : no); module.exports = ({result, siteUrl, membersUrl, emailRecipient}) => ` Your member import is complete
 
${iff(result.imported === 0 && result.errors.length === 0, ` `, ``)} ${iff(result.imported > 0, ` `, ``)} ${iff(result.errors.length > 0, ` `, '')}

${iff(result.imported > 0, `Your member import is complete`, `Your member import was unsuccessful`)}

No members were added.

A total of ${formatNumber(result.imported)} ${iff(result.imported === 1, 'person', 'people')} were successfully added or updated in your list of members, and now have access to your site.

${iff(result.imported === 0, `No members were added.`, `${formatNumber(result.errors.length)} ${iff(result.errors.length === 1, `member was`, `members were`)} skipped due to errors.`)} There's a validated CSV file attached to this email with the list of errors so that you can fix them and re-upload the CSV to complete the import.

${iff(result.imported > 0, `View members`, `Try again`)}
 
`;