import { getCountryCallingCode } from '../../../../../libphonenumber-js@1.12.41/node_modules/libphonenumber-js/es6/metadata.js';

function getPrefixForFormattingValueAsPhoneNumber(_ref) {
  var inputFormat = _ref.inputFormat,
    country = _ref.country,
    metadata = _ref.metadata;
  return inputFormat === 'NATIONAL_PART_OF_INTERNATIONAL' ? "+".concat(getCountryCallingCode(country, metadata)) : '';
}
function removePrefixFromFormattedPhoneNumber(value, prefix) {
  if (prefix) {
    value = value.slice(prefix.length);
    if (value[0] === ' ') {
      value = value.slice(1);
    }
  }
  return value;
}

export { getPrefixForFormattingValueAsPhoneNumber, removePrefixFromFormattedPhoneNumber };
//# sourceMappingURL=inputValuePrefix.js.map
