text: "use strict";
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  exports.getTransporter = void 0;
  const nodemailer_1 = __importDefault(require("nodemailer"));
  const { CLIENT_ID, CLIENT_SECRET, REFRESH_TOKEN, ACCESS_TOKEN } = process.env;
  const getTransporter = async () => {
      if (process.env.NODE_ENV === "production") {
          return nodemailer_1.default.createTransport({
              host: "smtp.gmail.com",
              port: 465,
              secure: true,
              auth: {
                  type: "OAuth2",
                  user: process.env.NODEMAILER_EMAIL,
                  clientId: CLIENT_ID,
                  clientSecret: CLIENT_SECRET,
                  refreshToken: REFRESH_TOKEN,
                  accessToken: ACCESS_TOKEN,
                  expires: 3599,
              },
          });
      }
      return nodemailer_1.default.createTransport({
          host: "smtp.ethereal.email",
          port: 587,
          auth: {
              user: process.env.NODEMAILER_EMAIL,
              pass: process.env.NODEMAILER_PASSWORD,
          },
      });
  };
  exports.getTransporter = getTransporter;
  //# sourceMappingURL=email.js.map