import { CountryIso2, CountryData, ParsedCountry } from 'react-international-phone'; interface PhoneCountryOption { dialCode: string; iso2: CountryIso2; /** Display text, e.g. `United States (+1)`. */ label: string; name: string; } /** * Country data for a phone country selector, independent of any component * library. Renderers attach their own flag imagery and option shape. */ declare const getPhoneCountryOptions: (countries?: CountryData[]) => PhoneCountryOption[]; declare const isPhoneValid: (phone: string) => boolean; interface PhoneFormattingChars { charAfterDialCode: string; placeholderNumberChar: string; prefix: string; } /** * Normalize the configurable formatting characters to single characters with * the library defaults: `+` prefix, space after dial code, `.` placeholder. */ declare const normalizePhoneFormattingChars: (config: { charAfterDialCode?: string; placeholderNumberChar?: string; prefix?: string; }) => PhoneFormattingChars; /** * Build the input placeholder from the active formatting mask for the current * country, e.g. `+1 (...) ...-....`. */ declare const buildPhonePlaceholder: (options: { chars: PhoneFormattingChars; country: ParsedCountry; disableDialCodeAndPrefix?: boolean; phone: string; }) => string; /** * react-hook-form `validate` rule for a phone field. * * Accepts any leading fragment of the current dial code (e.g. `+`, `+1`) so * validation does not fire while the user is still typing the country code; * anything longer must be a valid number. */ declare const makePhoneValidate: (prefix: string, dialCode: string) => (value: string) => true | string; export { buildPhonePlaceholder, getPhoneCountryOptions, isPhoneValid, makePhoneValidate, normalizePhoneFormattingChars }; export type { PhoneCountryOption, PhoneFormattingChars };