import { EMAIL_REGISTRY } from "@nextsparkjs/registries/email-registry";
const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME || "Your App";
const emailTemplates = {
  verifyEmail: (data) => Promise.resolve(EMAIL_REGISTRY["verify-email"](data)),
  resetPassword: (data) => Promise.resolve(EMAIL_REGISTRY["reset-password"](data)),
  otpVerification: (data) => Promise.resolve(EMAIL_REGISTRY["otp-verification"](data)),
  teamInvitation: (data) => Promise.resolve(EMAIL_REGISTRY["team-invitation"](data))
};
const createVerificationEmail = (name, verifyUrl) => EMAIL_REGISTRY["verify-email"]({
  userName: name || "",
  verificationUrl: verifyUrl,
  appName: APP_NAME
});
const createPasswordResetEmail = (name, resetUrl) => EMAIL_REGISTRY["reset-password"]({
  userName: name || "",
  resetUrl,
  appName: APP_NAME
});
const createTeamInvitationEmail = (inviteeEmail, inviterName, teamName, role, acceptUrl, expiresIn = "7 days") => EMAIL_REGISTRY["team-invitation"]({
  inviteeEmail,
  inviterName,
  teamName,
  role,
  acceptUrl,
  expiresIn,
  appName: APP_NAME
});
export {
  createPasswordResetEmail,
  createTeamInvitationEmail,
  createVerificationEmail,
  emailTemplates
};
