import { CountryDialCode } from '../../models/country-dial-code.model'; /** * Resolves a bare dial code (as stored in the payload, e.g. "+1" or "+91") to a * single display country. Because several countries can share one dial code * (e.g. "+1" is used by the US, Canada and many others), a deterministic rule * selects which country to display: * - "+1" is special-cased to the United States. * - Otherwise the FIRST entry in `countries` matching the dial code is used. * Because the country list is sorted alphabetically by name, this is * deterministic (e.g. "+91" -> India, the only "+91" entry). * A leading "+" is normalized so a stored code with or without it still * resolves. Returns `undefined` when no country matches the dial code. * @param {string | null} dialCode - The stored dial code, e.g. "+91". * @param {CountryDialCode[]} countries - The full country dial-code list. * @return {CountryDialCode | undefined} The resolved display country. */ export declare function resolveCountryByDialCode(dialCode: string | null, countries: CountryDialCode[]): CountryDialCode | undefined; /** * Resolves a stored `countryCode` to a single display country, accepting both * the current combined format "ISO +dialCode" (e.g. "US +1", "IN +91") and the * legacy dial-code-only format (e.g. "+1", "+91", or "1"). When an ISO prefix * is present it is matched exactly (so US vs Canada are distinguished); when * only a dial code is present it falls back to `resolveCountryByDialCode` * ("+1" -> United States; otherwise the first alphabetical match). * @param {string | null} stored - The stored countryCode value. * @param {CountryDialCode[]} countries - The full country dial-code list. * @return {CountryDialCode | undefined} The resolved display country. */ export declare function resolveCountry(stored: string | null, countries: CountryDialCode[]): CountryDialCode | undefined;