using MemberCenter.Application.Abstractions;
using MemberCenter.Application.Models.Email;

namespace MemberCenter.Infrastructure.Services;

public sealed class AccountEmailTemplateService : IAccountEmailTemplateService
{
    public EmailTemplate BuildVerificationEmail(string verifyUrl)
    {
        return new EmailTemplate(
            "Verify your email",
            $"Please verify your email by opening this link: {verifyUrl}",
            $"<p>Please verify your email by clicking <a href=\"{verifyUrl}\">this link</a>.</p>");
    }

    public EmailTemplate BuildPasswordResetEmail(string resetUrl)
    {
        return new EmailTemplate(
            "Reset your password",
            $"Use this link to reset your password: {resetUrl}",
            $"<p>Use <a href=\"{resetUrl}\">this link</a> to reset your password.</p>");
    }
}
