export const emailConfig = {
  smtp: {
    host: process.env.SMTP_HOST || 'smtp.gmail.com',
    port: parseInt(process.env.SMTP_PORT || '587', 10),
    secure: process.env.SMTP_SECURE === 'true',
    auth: {
      user: process.env.SMTP_USER || '',
      pass: process.env.SMTP_PASSWORD || '',
    },
  },

  from: process.env.EMAIL_FROM || `RE Workflow System <notifications@${process.env.APP_DOMAIN || 'royalenfield.com'}>`,

  // Email templates
  templates: {
    workflowCreated: 'workflow-created',
    approvalRequired: 'approval-required',
    workflowApproved: 'workflow-approved',
    workflowRejected: 'workflow-rejected',
    tatReminder: 'tat-reminder',
    tatBreached: 'tat-breached',
  },

  // Email settings
  settings: {
    retryAttempts: 3,
    retryDelay: 5000, // 5 seconds
    batchSize: 50,
  },
};
