import { isValidPhoneNumber as isValidPhoneNumberWithMaxMetadata } from 'libphonenumber-js/max'; import type { CountryCode } from 'libphonenumber-js'; export declare const isValidPhoneNumber: typeof isValidPhoneNumberWithMaxMetadata; export declare function getMobilePrefixRules(isoCode: CountryCode): string[]; export interface MobileStartingDigits { national: string[]; local: string[]; } export declare function getMobileStartingDigits(isoCode: CountryCode): MobileStartingDigits; /** * Resolves the specific ISO country for a stored dial code and national number. * * Several countries share one dial code (notably "+1" for the US, Canada and * other NANP territories), so the dial code alone cannot identify the country. * The national number can: libphonenumber-js `max` metadata maps the number's * area/prefix to its country (e.g. "+1 416…" -> CA, "+1 201…" -> US). Only a * complete, valid number resolves; a partial number still being typed or an * unassigned prefix returns `undefined`, so callers keep their dial-code-based * default and the dropdown does not flip around mid-entry. * @param {string | null | undefined} dialCode - The stored dial code, e.g. "+1". * @param {string | null | undefined} nationalDigits - The national number digits. * @return {CountryCode | undefined} The resolved ISO alpha-2 code, or undefined. */ export declare function resolveCountryFromNumber(dialCode: string | null | undefined, nationalDigits: string | null | undefined): CountryCode | undefined; /** * Checks whether the selected country's metadata identifies the national * number as longer than any supported length. */ export declare function isPhoneNumberTooLong(nationalDigits: string, isoCode: CountryCode): boolean; /** * Formats a national phone number into the selected country's conventional * grouping as the user types (e.g. "98765 43210" for India, "(201) 555-0123" * for the US), using libphonenumber-js `AsYouType`. Input is expected to be * digits only; the returned string is for DISPLAY only — callers keep the raw * digits for the stored value. * @param {string} nationalDigits - The national number digits (no formatting). * @param {CountryCode} isoCode - The ISO 3166-1 alpha-2 country code. * @return {string} The number formatted in the country's national format. */ export declare function formatNationalNumber(nationalDigits: string, isoCode: CountryCode): string; /** * Returns the library's example national number for use as an input hint. * The number is illustrative only and is never written to the form value. * @param {CountryCode} isoCode - The selected country's ISO alpha-2 code. * @return {string} A formatted example number, or an empty string if unavailable. */ export declare function getNationalNumberPlaceholder(isoCode: CountryCode): string;