import Brevo from '@getbrevo/brevo';
import config from '@/shared/config/config';

const brevoAPIKey = config.brevo?.apiKey;

if (!brevoAPIKey) {
  console.warn('BREVO_API_KEY not configured - contact management will not work');
}

// Only keep contact client as transactional emails and campaigns have been migrated to SES
const brevoContactClient = new Brevo.ContactsApi();
brevoContactClient.setApiKey(Brevo.ContactsApiApiKeys.apiKey, brevoAPIKey);

export { brevoContactClient };
