import type { VegaCountryCode } from '../../types/flag.type'; import type { FormatRule, MetadataJson } from './types'; export declare const META: MetadataJson; /** * Return the calling code string for a given country code. * * @param {VegaCountryCode} country - the country code to look up * @returns {string} the calling code for the given country * @example getCountryCallingCode('US') // '1' */ export declare function getCountryCallingCode(country: VegaCountryCode): string; /** * Return an array of all supported country codes. * * @returns {VegaCountryCode[]} an array of supported country codes */ export declare function getCountries(): VegaCountryCode[]; /** * Get the list of format rules for a country. Returns undefined if none. * * @param {VegaCountryCode} country - the country code to retrieve formats for * @returns {FormatRule[] | undefined} the format rules or undefined */ export declare function getFormats(country: VegaCountryCode): FormatRule[] | undefined; /** * Given digits (without leading +), detect which calling code prefix matches. * * @param {string} digits - the digit string to detect a calling code from * @returns {{ countries: string[] | undefined; callingCode: string | undefined }} the matched countries and calling code */ export declare function detectCallingCode(digits: string): { countries: string[] | undefined; callingCode: string | undefined; }; /** * Determine the specific country from a set of countries sharing the same * calling code, by checking leading digits patterns and validation patterns. * * Mirrors getCountryByNationalNumber from the original library. * * @param {string[]} possibleCountries - the candidate country codes * @param {string} nationalNumber - the national number to match against * @returns {VegaCountryCode | undefined} the matched country or undefined */ export declare function getCountryByNationalNumber(possibleCountries: string[], nationalNumber: string): VegaCountryCode | undefined;