// src/lib/send-email.ts
import { Resend } from "resend";
var SendEmail = async ({
  key,
  provider,
  to,
  subject,
  html,
  text,
  from
}) => {
  switch (provider) {
    case "resend":
      return await sendEmailWithResend(key, to, subject, html, text, from);
    default:
      throw new Error(`Unsupported email provider: ${provider}`);
  }
};
var sendEmailWithResend = async (key, to, subject, html, text, from) => {
  const resend = new Resend(key);
  return await resend.emails.send({
    from,
    to,
    subject,
    html,
    text
  });
};
export {
  SendEmail
};
//# sourceMappingURL=send-email.js.map