package mailkey

import "github.com/tech/sendico/notification/interface/api/localizer"

func Get(template, part string) string {
	return "mail." + template + "." + part
}

func Subject(l localizer.Localizer, data map[string]any, templateID, locale string) (string, error) {
	return l.LocalizeTemplate(Get(templateID, "subj"), data, nil, locale)
}

func Body(l localizer.Localizer, data map[string]any, templateID, locale string) (string, error) {
	return l.LocalizeTemplate(Get(templateID, "body"), data, nil, locale)
}
