"use strict";
const watchlist_repository = require("./watchlist.repository-kxeO-FOE.cjs");
const getFieldIdentifier = (field) => field.identifier || field.label;
const checkIfFreeEmailDomain = async (email) => {
  const emailDomain = email.split("@")[1].toLowerCase();
  if (!emailDomain)
    return true;
  if (emailDomain === "gmail.com" || emailDomain === "outlook.com")
    return true;
  const watchlistRepository = new watchlist_repository.WatchlistRepository();
  return !!await watchlistRepository.getFreeEmailDomainInWatchlist(emailDomain);
};
exports.checkIfFreeEmailDomain = checkIfFreeEmailDomain;
exports.getFieldIdentifier = getFieldIdentifier;
