/**
 * Email Services Index
 *
 * Exports all email-related services and types.
 */

export { EmailProviderService } from './EmailProviderService';
export type {
  SendCampaignOptions,
  CampaignResult,
  ContactData,
  ContactResult,
  ListData,
  ListResult,
  SenderData,
  SenderResult,
  CampaignStats,
  WebhookData,
  WebhookResult,
  AccountInfo,
  TemplateResult,
} from './EmailProviderService';

export { BrevoProvider } from './BrevoProvider';
export { EmailIntegrationService, emailIntegrationService } from './EmailIntegrationService';

// ── Transactional email (SMTP) ──
// Separate from the campaign providers above: this is the system-email path
// (OTP, verification, password reset, notifications), sent over the SMTP
// credentials the Super Admin configures under Email Configuration.
export {
  sendSystemEmail,
  loadSmtpSettings,
  loadSmtpSettingsById,
  verifySmtpConnection,
  invalidateMailerCache,
  isTransactionalEmailReady,
  isMailerDependencyAvailable,
} from './transactionalMailer';
export type { SendSystemEmailParams, SendEmailResult, SmtpSettings } from './transactionalMailer';
export {
  sendOtpEmail,
  sendEmailVerification,
  sendPasswordResetEmail,
  sendPasswordChangedEmail,
  sendWelcomeEmail,
  sendAccountCreatedEmail,
  sendInvitationEmail,
  sendPaymentSuccessEmail,
  sendPaymentFailedEmail,
  sendSubscriptionExpiringEmail,
  sendTrialEndingEmail,
  sendInvoiceReadyEmail,
  sendNotificationEmail,
} from './systemEmails';
export { SMTP_PROVIDERS, getSmtpProviderPreset } from './smtpProviders';
export { SYSTEM_EMAIL_TEMPLATES, resolveSystemTemplate, renderTemplate } from './systemEmailTemplates';