import { EMAIL_ACTION_LINK_COMPONENT } from '../extensions'; import { type ActionEmailData, ActionEmailTemplate, type ActionEmailTemplateProps, } from '../components'; export const getDefaultInviteOwnerEmailData = ( mode: 'tag' | 'text', args: { appName: string; signInLink: string; } ): ActionEmailData => { const signInLink = mode === 'tag' ? EMAIL_ACTION_LINK_COMPONENT : args.signInLink; return { bodyOne: `

You are invited to access your Owner Portal on ${args.appName}.

Accept the invitation below to set up your access.

`, bodyTwo: `

If you have any trouble with the button, you can copy and paste the link below into your browser: ${signInLink}

`, buttonText: 'Accept Invitation', header: 'Welcome to your Owner Portal!', shortDescription: 'Set up your Owner Portal access using your invitation.', href: args.signInLink, subject: `Your invitation to the ${args.appName} Owner Portal`, }; }; export const InviteOwnerEmailTemplate = ({ ownerAccessRole = 'admin', ...props }: ActionEmailTemplateProps & { ownerAccessRole?: 'admin' | 'viewer'; }) => { return (

This invitation link is for one-time setup of your Owner Portal access and expires after 7 days. Sign up using the exact email address this invitation was sent to.

If your invitation expires before setup is complete, contact your property manager for a new invitation.

For questions about ${ownerAccessRole === 'viewer' ? 'portal access' : 'your statements or portal access'}, contact your property manager.

`, }} /> ); };