"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmailTemplateHelper = void 0;
class EmailTemplateHelper {
    static getLocalizedSubject(subjectKey, subjects, language) {
        return subjects[subjectKey]?.[language] || subjects[subjectKey]?.['en'] || 'SerpentRace';
    }
    static replaceTemplatePlaceholders(template, data) {
        return template.replace(/\{\{(\w+)\}\}/g, (match, key) => {
            return data[key] !== undefined ? String(data[key]) : match;
        });
    }
    static processTemplate(templateContent, data) {
        return {
            html: this.replaceTemplatePlaceholders(templateContent.html, data),
            text: this.replaceTemplatePlaceholders(templateContent.text, data)
        };
    }
}
exports.EmailTemplateHelper = EmailTemplateHelper;
//# sourceMappingURL=EmailTemplateHelper.js.map