function brandedWrapper(title: string, body: string) { return `

🛡️ ShieldAI

Intelligent Protection

${title}

${body}

ShieldAI — Your intelligent digital protection platform

`; } function brandedText(text: string) { return `ShieldAI - Intelligent Protection\n\n${text}\n\n---\nShieldAI - Your intelligent digital protection platform`; } export interface EmailTemplate { subject: string; html: string; text: string; } export function welcomeEmail(name: string): EmailTemplate { return { subject: "Welcome to ShieldAI", html: brandedWrapper( "Welcome to ShieldAI!", `

Hi ${name},

Thank you for joining ShieldAI. We're here to help you monitor and protect your digital identity.

Get started by adding your first watchlist item, and we'll alert you to any exposures or threats.

Stay safe,
The ShieldAI Team

`, ), text: brandedText( `Hi ${name},\n\nThank you for joining ShieldAI. We're here to help you monitor and protect your digital identity.\n\nGet started by adding your first watchlist item, and we'll alert you to any exposures or threats.\n\nStay safe,\nThe ShieldAI Team`, ), }; } export function alertNotificationEmail( alertTitle: string, alertMessage: string, severity: string, ): EmailTemplate { const severityColor = severity === "critical" ? "#dc2626" : severity === "warning" ? "#d97706" : "#2563eb"; return { subject: `[${severity.toUpperCase()}] ShieldAI Alert: ${alertTitle}`, html: brandedWrapper( `Alert: ${alertTitle}`, `
${severity}

${alertMessage}

Log in to ShieldAI for more details.

`, ), text: brandedText( `[${severity.toUpperCase()}] Alert: ${alertTitle}\n\n${alertMessage}\n\nLog in to ShieldAI for more details.`, ), }; } export function passwordResetEmail(resetLink: string): EmailTemplate { return { subject: "Reset your ShieldAI password", html: brandedWrapper( "Password Reset", `

You requested a password reset. Click the button below to set a new password.

Reset Password

If you didn't request this, you can safely ignore this email. The link expires in 1 hour.

`, ), text: brandedText( `Password Reset\n\nYou requested a password reset. Use this link to set a new password:\n${resetLink}\n\nIf you didn't request this, you can safely ignore this email. The link expires in 1 hour.`, ), }; } export function familyInviteEmail( inviterName: string, groupName: string, acceptLink: string, ): EmailTemplate { return { subject: `${inviterName} invited you to ${groupName} on ShieldAI`, html: brandedWrapper( "Family Invitation", `

${inviterName} has invited you to join ${groupName} on ShieldAI.

As a family member, you'll get shared protection and alerts for your digital identity.

Accept Invitation
`, ), text: brandedText( `Family Invitation\n\n${inviterName} has invited you to join ${groupName} on ShieldAI.\n\nAs a family member, you'll get shared protection and alerts for your digital identity.\n\nAccept the invitation: ${acceptLink}`, ), }; } export function billingReceiptEmail( planName: string, amount: string, date: string, receiptUrl: string, ): EmailTemplate { return { subject: `ShieldAI receipt — ${planName} (${date})`, html: brandedWrapper( "Payment Receipt", `

Thank you for your payment.

Plan ${planName}
Amount ${amount}
Date ${date}
View Receipt
`, ), text: brandedText( `Payment Receipt\n\nThank you for your payment.\n\nPlan: ${planName}\nAmount: ${amount}\nDate: ${date}\n\nView receipt: ${receiptUrl}`, ), }; }