/** * Every country a phone number can be issued in, with the calling code it is * reached on and the trunk digit it is dialled with at home. * * The whole ITU list, not the countries whose currency the rail quotes: where * a buyer's money comes from says nothing about where their SIM does, and a * shorter list makes a valid number unsendable. * * Generated from libphonenumber's metadata (v4, via libphonenumber-js 1.13.6) * and named by `Intl.DisplayNames`. Calling codes and trunk prefixes are ITU * and national-regulator facts; regenerate rather than hand-edit a row. */ export interface PhoneCountry { /** ISO 3166-1 alpha-2, which is also what the geo lookup answers. */ alpha2: string; /** E.164 calling code, `+` included. */ dialCode: string; /** English name, used when the platform can name no other. */ name: string; /** * The digit a national number is dialled with at home and never carries * internationally — `0` in most of Europe, `1` in the NANP, `8` in Russia. * Absent where the country has none: an Italian number keeps its zero. */ trunkPrefix?: string; } /** Ordered by English name, which is the order the list draws them in. */ export declare const PHONE_COUNTRIES: readonly PhoneCountry[]; export declare function phoneCountry(alpha2: string | undefined): PhoneCountry | undefined; /** The country the field opens on, from wherever the buyer is. */ export declare function defaultPhoneCountry(alpha2: string | undefined): PhoneCountry; /** * `\u{1F1E6}\u{1F1FA}` from `AU`: alpha-2 letters map onto the * regional-indicator block, so the flag needs no asset and no per-country * entry. */ export declare function countryFlag(alpha2: string): string; /** * The country's name in the app's language. * * Read off the platform rather than the translation files: 245 countries in 8 * locales is copy nobody would review, and every runtime that ships ICU * already knows them. The table's English is the fallback where it does not. */ export declare function countryName(country: PhoneCountry, locale: string): string; /** * The wire value: the code and the digits typed under it, with nothing * between. An unanswered field stays empty rather than becoming a bare code — * `+61` alone is not an incomplete number, it is no number. */ export declare function toE164(country: PhoneCountry, national: string): string; /** The code a number opens with, read off digits carrying no `+`. */ export declare function leadingDialCode(digits: string): string | undefined; /** The chip keeps a code it already carries; else the code's own country. */ export declare function countryOnDialCode(code: string, preferred: PhoneCountry): PhoneCountry; /** * What the box shows: the number less any code the table knows, not only the * chip's — autofill hands the contact over with its own. */ export declare function nationalPart(value: string): string; //# sourceMappingURL=phoneCountries.d.ts.map