import { PhoneNumberParseOptions, ParsedPhoneNumber, AsYouType, PhoneNumberTypes } from 'awesome-phonenumber'; import { ForwardRefExoticComponent, RefAttributes, ReactNode, ReactElement } from 'react'; import { BaseTextFieldProps, LinkProps } from '@material-ui/core'; declare const COUNTRY_CODE_METADATA: readonly [readonly ["US", 1, "United States"], readonly ["CA", 1, "Canada"], readonly ["AU", 61, "Australia"], readonly ["NZ", 64, "New Zealand"], readonly ["AC", 247, "Ascension Island"], readonly ["AD", 376, "Andorra"], readonly ["AE", 971, "United Arab Emirates"], readonly ["AF", 93, "Afghanistan"], readonly ["AG", 1, "Antigua and Barbuda"], readonly ["AI", 1, "Anguilla"], readonly ["AL", 355, "Albania"], readonly ["AM", 374, "Armenia"], readonly ["AO", 244, "Angola"], readonly ["AR", 54, "Argentina"], readonly ["AS", 1, "American Samoa"], readonly ["AT", 43, "Austria"], readonly ["AW", 297, "Aruba"], readonly ["AX", 358, "Åland Islands"], readonly ["AZ", 994, "Azerbaijan"], readonly ["BA", 387, "Bosnia and Herzegovina"], readonly ["BB", 1, "Barbados"], readonly ["BD", 880, "Bangladesh"], readonly ["BE", 32, "Belgium"], readonly ["BF", 226, "Burkina Faso"], readonly ["BG", 359, "Bulgaria"], readonly ["BH", 973, "Bahrain"], readonly ["BI", 257, "Burundi"], readonly ["BJ", 229, "Benin"], readonly ["BL", 590, "Saint Barthélemy"], readonly ["BM", 1, "Bermuda"], readonly ["BN", 673, "Brunei"], readonly ["BO", 591, "Bolivia"], readonly ["BQ", 599, "Caribbean Netherlands"], readonly ["BR", 55, "Brazil"], readonly ["BS", 1, "Bahamas"], readonly ["BT", 975, "Bhutan"], readonly ["BW", 267, "Botswana"], readonly ["BY", 375, "Belarus"], readonly ["BZ", 501, "Belize"], readonly ["CC", 61, "Cocos"], readonly ["CD", 243, "Congo"], readonly ["CF", 236, "Central African Republic"], readonly ["CG", 242, "Congo"], readonly ["CH", 41, "Switzerland"], readonly ["CI", 225, "Côte d’Ivoire"], readonly ["CK", 682, "Cook Islands"], readonly ["CL", 56, "Chile"], readonly ["CM", 237, "Cameroon"], readonly ["CN", 86, "China"], readonly ["CO", 57, "Colombia"], readonly ["CR", 506, "Costa Rica"], readonly ["CU", 53, "Cuba"], readonly ["CV", 238, "Cape Verde"], readonly ["CW", 599, "Curaçao"], readonly ["CX", 61, "Christmas Island"], readonly ["CY", 357, "Cyprus"], readonly ["CZ", 420, "Czech Republic"], readonly ["DE", 49, "Germany"], readonly ["DJ", 253, "Djibouti"], readonly ["DK", 45, "Denmark"], readonly ["DM", 1, "Dominica"], readonly ["DO", 1, "Dominican Republic"], readonly ["DZ", 213, "Algeria"], readonly ["EC", 593, "Ecuador"], readonly ["EE", 372, "Estonia"], readonly ["EG", 20, "Egypt"], readonly ["EH", 212, "Western Sahara"], readonly ["ER", 291, "Eritrea"], readonly ["ES", 34, "Spain"], readonly ["ET", 251, "Ethiopia"], readonly ["FI", 358, "Finland"], readonly ["FJ", 679, "Fiji"], readonly ["FK", 500, "Falkland Islands"], readonly ["FM", 691, "Micronesia"], readonly ["FO", 298, "Faroe Islands"], readonly ["FR", 33, "France"], readonly ["GA", 241, "Gabon"], readonly ["GB", 44, "United Kingdom"], readonly ["GD", 1, "Grenada"], readonly ["GE", 995, "Georgia"], readonly ["GF", 594, "French Guiana"], readonly ["GG", 44, "Guernsey"], readonly ["GH", 233, "Ghana"], readonly ["GI", 350, "Gibraltar"], readonly ["GL", 299, "Greenland"], readonly ["GM", 220, "Gambia"], readonly ["GN", 224, "Guinea"], readonly ["GP", 590, "Guadeloupe"], readonly ["GQ", 240, "Equatorial Guinea"], readonly ["GR", 30, "Greece"], readonly ["GT", 502, "Guatemala"], readonly ["GU", 1, "Guam"], readonly ["GW", 245, "Guinea-Bissau"], readonly ["GY", 592, "Guyana"], readonly ["HK", 852, "Hong Kong"], readonly ["HN", 504, "Honduras"], readonly ["HR", 385, "Croatia"], readonly ["HT", 509, "Haiti"], readonly ["HU", 36, "Hungary"], readonly ["ID", 62, "Indonesia"], readonly ["IE", 353, "Ireland"], readonly ["IL", 972, "Israel"], readonly ["IM", 44, "Isle of Man"], readonly ["IN", 91, "India"], readonly ["IO", 246, "British Indian Ocean Territory"], readonly ["IQ", 964, "Iraq"], readonly ["IR", 98, "Iran"], readonly ["IS", 354, "Iceland"], readonly ["IT", 39, "Italy"], readonly ["JE", 44, "Jersey"], readonly ["JM", 1, "Jamaica"], readonly ["JO", 962, "Jordan"], readonly ["JP", 81, "Japan"], readonly ["KE", 254, "Kenya"], readonly ["KG", 996, "Kyrgyzstan"], readonly ["KH", 855, "Cambodia"], readonly ["KI", 686, "Kiribati"], readonly ["KM", 269, "Comoros"], readonly ["KN", 1, "Saint Kitts and Nevis"], readonly ["KP", 850, "North Korea"], readonly ["KR", 82, "South Korea"], readonly ["KW", 965, "Kuwait"], readonly ["KY", 1, "Cayman Islands"], readonly ["KZ", 7, "Kazakhstan"], readonly ["LA", 856, "Laos"], readonly ["LB", 961, "Lebanon"], readonly ["LC", 1, "Saint Lucia"], readonly ["LI", 423, "Liechtenstein"], readonly ["LK", 94, "Sri Lanka"], readonly ["LR", 231, "Liberia"], readonly ["LS", 266, "Lesotho"], readonly ["LT", 370, "Lithuania"], readonly ["LU", 352, "Luxembourg"], readonly ["LV", 371, "Latvia"], readonly ["LY", 218, "Libya"], readonly ["MA", 212, "Morocco"], readonly ["MC", 377, "Monaco"], readonly ["MD", 373, "Moldova"], readonly ["ME", 382, "Montenegro"], readonly ["MF", 590, "Saint Martin"], readonly ["MG", 261, "Madagascar"], readonly ["MH", 692, "Marshall Islands"], readonly ["MK", 389, "Macedonia"], readonly ["ML", 223, "Mali"], readonly ["MM", 95, "Myanmar"], readonly ["MN", 976, "Mongolia"], readonly ["MO", 853, "Macau"], readonly ["MP", 1, "Northern Mariana Islands"], readonly ["MQ", 596, "Martinique"], readonly ["MR", 222, "Mauritania"], readonly ["MS", 1, "Montserrat"], readonly ["MT", 356, "Malta"], readonly ["MU", 230, "Mauritius"], readonly ["MV", 960, "Maldives"], readonly ["MW", 265, "Malawi"], readonly ["MX", 52, "Mexico"], readonly ["MY", 60, "Malaysia"], readonly ["MZ", 258, "Mozambique"], readonly ["NA", 264, "Namibia"], readonly ["NC", 687, "New Caledonia"], readonly ["NE", 227, "Niger"], readonly ["NF", 672, "Norfolk Island"], readonly ["NG", 234, "Nigeria"], readonly ["NI", 505, "Nicaragua"], readonly ["NL", 31, "Netherlands"], readonly ["NO", 47, "Norway"], readonly ["NP", 977, "Nepal"], readonly ["NR", 674, "Nauru"], readonly ["NU", 683, "Niue"], readonly ["OM", 968, "Oman"], readonly ["PA", 507, "Panama"], readonly ["PE", 51, "Peru"], readonly ["PF", 689, "French Polynesia"], readonly ["PG", 675, "Papua New Guinea"], readonly ["PH", 63, "Philippines"], readonly ["PK", 92, "Pakistan"], readonly ["PL", 48, "Poland"], readonly ["PM", 508, "Saint Pierre and Miquelon"], readonly ["PR", 1, "Puerto Rico"], readonly ["PS", 970, "Palestine"], readonly ["PT", 351, "Portugal"], readonly ["PW", 680, "Palau"], readonly ["PY", 595, "Paraguay"], readonly ["QA", 974, "Qatar"], readonly ["RE", 262, "Réunion"], readonly ["RO", 40, "Romania"], readonly ["RS", 381, "Serbia"], readonly ["RU", 7, "Russia"], readonly ["RW", 250, "Rwanda"], readonly ["SA", 966, "Saudi Arabia"], readonly ["SB", 677, "Solomon Islands"], readonly ["SC", 248, "Seychelles"], readonly ["SD", 249, "Sudan"], readonly ["SE", 46, "Sweden"], readonly ["SG", 65, "Singapore"], readonly ["SH", 290, "Saint Helena"], readonly ["SI", 386, "Slovenia"], readonly ["SJ", 47, "Svalbard and Jan Mayen"], readonly ["SK", 421, "Slovakia"], readonly ["SL", 232, "Sierra Leone"], readonly ["SM", 378, "San Marino"], readonly ["SN", 221, "Senegal"], readonly ["SO", 252, "Somalia"], readonly ["SR", 597, "Suriname"], readonly ["SS", 211, "South Sudan"], readonly ["ST", 239, "São Tomé and Príncipe"], readonly ["SV", 503, "El Salvador"], readonly ["SX", 1, "Sint Maarten"], readonly ["SY", 963, "Syria"], readonly ["SZ", 268, "Swaziland"], readonly ["TA", 290, "Tristan da Cunha"], readonly ["TC", 1, "Turks and Caicos Islands"], readonly ["TD", 235, "Chad"], readonly ["TG", 228, "Togo"], readonly ["TH", 66, "Thailand"], readonly ["TJ", 992, "Tajikistan"], readonly ["TK", 690, "Tokelau"], readonly ["TL", 670, "Timor-Leste"], readonly ["TM", 993, "Turkmenistan"], readonly ["TN", 216, "Tunisia"], readonly ["TO", 676, "Tonga"], readonly ["TR", 90, "Turkey"], readonly ["TT", 1, "Trinidad and Tobago"], readonly ["TV", 688, "Tuvalu"], readonly ["TW", 886, "Taiwan"], readonly ["TZ", 255, "Tanzania"], readonly ["UA", 380, "Ukraine"], readonly ["UG", 256, "Uganda"], readonly ["UY", 598, "Uruguay"], readonly ["UZ", 998, "Uzbekistan"], readonly ["VA", 39, "Vatican City"], readonly ["VC", 1, "Saint Vincent and the Grenadines"], readonly ["VE", 58, "Venezuela"], readonly ["VG", 1, "British Virgin Islands"], readonly ["VI", 1, "U.S. Virgin Islands"], readonly ["VN", 84, "Vietnam"], readonly ["VU", 678, "Vanuatu"], readonly ["WF", 681, "Wallis and Futuna"], readonly ["WS", 685, "Samoa"], readonly ["XK", 383, "Kosovo"], readonly ["YE", 967, "Yemen"], readonly ["YT", 262, "Mayotte"], readonly ["ZA", 27, "South Africa"], readonly ["ZM", 260, "Zambia"], readonly ["ZW", 263, "Zimbabwe"]]; declare type CountryISO = typeof COUNTRY_CODE_METADATA[number][0]; declare const DEFAULT_COUNTRY: CountryISO; declare function listCountries(): readonly CountryISO[]; declare function isCountryISO(value: unknown): value is CountryISO; declare function toCountryISO(value: unknown): CountryISO; declare function getCountryCode(country: CountryISO): number; declare function formatCountry(country: CountryISO): string; interface APNStatic { parsePhoneNumber: (input: string, options?: PhoneNumberParseOptions) => ParsedPhoneNumber; getAsYouType: (regionCode: string) => AsYouType; getExample: (regionCode: string, type?: PhoneNumberTypes) => ParsedPhoneNumber; } declare type PhoneNumberPossibility = 'is-possible' | 'invalid-country-code' | 'invalid-number' | 'too-long' | 'too-short' | 'unknown'; interface PhoneNumberJSON { valid: boolean; possible: boolean; possibility: PhoneNumberPossibility; regionCode: CountryISO; number: { input: string; international?: string; national?: string; }; } interface PhoneNumberInfo { country: CountryISO; nationalNumber: string; } declare type PhoneNumberFormat = 'e164' | 'international' | 'national' | 'rfc3966'; interface PhoneValidationRules { required?: boolean; requiredMessage?: string; tooShortMessage?: string; tooLongMessage?: string; invalidMessage?: string; } interface PhoneFormatOptions { fallback?: string; country?: CountryISO; format?: PhoneNumberFormat; } declare class PhoneService { static load(): Promise; static checkPossibility(input: unknown): Promise; static validate(input: unknown, rules?: PhoneValidationRules): Promise; readonly APN: APNStatic; constructor(APN: APNStatic); createAPN(phone: string, country?: CountryISO): ParsedPhoneNumber; getJSON(phone: string, country?: CountryISO): PhoneNumberJSON; checkPossibility(input: unknown): PhoneNumberPossibility; validate(input: unknown, { required, requiredMessage, invalidMessage, tooLongMessage, tooShortMessage, }?: PhoneValidationRules): string | undefined; deletePrefix(phone: string, country: CountryISO): string; getInfo(phone: string): PhoneNumberInfo; format(input: unknown, { fallback, format, country: countryOption, }?: PhoneFormatOptions): string; formatNationalNumber(country: CountryISO, internationalNumber?: string): string | undefined; private customFormat; } declare function usePhoneService(): PhoneService; declare function useFormattedPhoneNumber(input: unknown, { format, country, fallback }?: PhoneFormatOptions): string; interface PhoneFieldProps extends Pick { value?: null | string; onBlur?: (value: string) => void; onFocus?: (value: string) => void; onChange?: (value: string) => void; } declare const PhoneField: ForwardRefExoticComponent>; interface SuspendedPhoneFieldProps extends PhoneFieldProps { suspenseFallback?: ReactNode; } declare const SuspendedPhoneField: ForwardRefExoticComponent>; interface PhoneLinkProps extends RefAttributes, Omit { phone: unknown; country?: CountryISO; format?: PhoneNumberFormat; fallback?: ReactNode; } declare const PhoneLink: ForwardRefExoticComponent; interface SuspendedPhoneLinkProps extends PhoneLinkProps { suspenseFallback?: ReactNode; } declare const SuspendedPhoneLink: ForwardRefExoticComponent; interface PhoneTextProps { phone: unknown; fallback?: ReactNode; country?: CountryISO; format?: PhoneNumberFormat; } declare function PhoneText({ phone, country, fallback, format, }: PhoneTextProps): null | ReactElement; interface SuspendedPhoneTextProps extends PhoneTextProps { suspenseFallback?: ReactNode; } declare function SuspendedPhoneText({ suspenseFallback, ...props }: SuspendedPhoneTextProps): ReactElement; export { CountryISO, DEFAULT_COUNTRY, PhoneField, PhoneFieldProps, PhoneFormatOptions, PhoneLink, PhoneLinkProps, PhoneNumberFormat, PhoneNumberInfo, PhoneNumberPossibility, PhoneService, PhoneText, PhoneTextProps, PhoneValidationRules, SuspendedPhoneField, SuspendedPhoneFieldProps, SuspendedPhoneLink, SuspendedPhoneLinkProps, SuspendedPhoneText, SuspendedPhoneTextProps, formatCountry, getCountryCode, isCountryISO, listCountries, toCountryISO, useFormattedPhoneNumber, usePhoneService };