import { findCountryByPrefix } from '../findCountryByPrefix/index.mjs';

/**
 * @param number Phone number in a format like "+447573135343"
 */
const explodeNumberModel = number => {
  const country = findCountryByPrefix(number);
  return country ? {
    prefix: country.phone,
    suffix: number.slice(country.phone.length),
    format: country.phoneFormat
  } : {
    prefix: null,
    suffix: number.slice(1)
  };
};

export { explodeNumberModel };
//# sourceMappingURL=index.mjs.map
