const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.js');
const require_getCountryByNationalNumber$1 = require('./getCountryByNationalNumber.js');

//#region ../../node_modules/.pnpm/libphonenumber-js@1.11.3/node_modules/libphonenumber-js/build/helpers/getCountryByCallingCode.js
var require_getCountryByCallingCode = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/libphonenumber-js@1.11.3/node_modules/libphonenumber-js/build/helpers/getCountryByCallingCode.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	exports["default"] = getCountryByCallingCode;
	var _getCountryByNationalNumber = _interopRequireDefault(require_getCountryByNationalNumber$1.require_getCountryByNationalNumber());
	function _interopRequireDefault(obj) {
		return obj && obj.__esModule ? obj : { "default": obj };
	}
	var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;
	function getCountryByCallingCode(callingCode, _ref) {
		var nationalPhoneNumber = _ref.nationalNumber, defaultCountry = _ref.defaultCountry, metadata = _ref.metadata;
		/* istanbul ignore if */
		if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {
			if (metadata.isNonGeographicCallingCode(callingCode)) return "001";
		}
		var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);
		if (!possibleCountries) return;
		if (possibleCountries.length === 1) return possibleCountries[0];
		return (0, _getCountryByNationalNumber["default"])(nationalPhoneNumber, {
			countries: possibleCountries,
			defaultCountry,
			metadata: metadata.metadata
		});
	}
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_getCountryByCallingCode();
  }
});