const loadLibphonenumber = async () => {
  const { default: _ } = await import("google-libphonenumber");
  return _;
};
const validPhoneNumber = async (country, phoneNum) => {
  try {
    const libPhone = await loadLibphonenumber();
    const phoneUtil = libPhone.PhoneNumberUtil.getInstance();
    const phone = phoneUtil.parseAndKeepRawInput(phoneNum, country);
    return phoneUtil.isValidNumberForRegion(phone, country);
  } catch (e) {
    throw e;
  }
};
export {
  validPhoneNumber
};
