// Reference fro localeCompare : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
const filterCountriesByIso3 = (countries, iso3Codes) => {
  const iso3CodesSet = new Set(iso3Codes);
  return countries.filter(country => !iso3CodesSet.has(country.iso3));
};
/**
 * Removes the countries sepecified in the second param
 *
 * @param countries list of country metadata objects
 * @param disabledCountries list of iso3 country codes to remove from the list
 */
const excludeCountries = (countries, disabledCountries) => {
  return disabledCountries.length > 0 ? filterCountriesByIso3(countries, disabledCountries) : countries;
};

export { excludeCountries };
//# sourceMappingURL=excludeCountries.mjs.map
