import { CountryCallingCode, CountryCode, E164Number } from "libphonenumber-js"; import React from "react"; import { AvailableLocales } from "../../locale"; export interface PhoneRules extends Partial> { } export declare const LS_BUSINESS_PHONE_RULES: PhoneRules; export interface PhoneNumberInputProps extends Partial> { /** * Phone handle value * * Resolves to undefined unless posssible phone number is entered @type {E164Number | undefined} @see isPossiblePhoneNumber */ phoneHandle: E164Number | undefined; /** * Phone handle setter * @param {E164Number | undefined} value * @return {void} */ setPhoneHandle: (value: E164Number | undefined) => void; /** * Country code value * * Resolves to undefined unless a valid country calling code is entered * @type {CountryCode | undefined} */ countryCode: CountryCode | undefined; /** * Country code setter * @param {CountryCode | undefined} value * @return {void} */ setCountryCode: (value: CountryCode | undefined) => void; /** * Country calling code value * * Resolves to undefined unless a valid country calling code is entered * @type {CountryCallingCode | undefined} */ countryCallingCode: CountryCallingCode | undefined; /** * Country calling code setter * @param {CountryCallingCode | undefined} value * @return {void} */ setCountryCallingCode: (value: CountryCallingCode | undefined) => void; /** * If there was an error external to the component, this will show an error message * @type {boolean} */ errorOnCreation: boolean; /** * If the input is required * @type {boolean} */ isRequired?: boolean; /** * Default phone handle * @type {E164Number} */ defaultPhoneHandle?: E164Number; /** * Default country to initialize the component with * @type {CountryCode} */ defaultCountry?: CountryCode; /** * Default country calling code to initialize the component with * @type {CountryCallingCode} */ defaultCountryCallingCode?: CountryCallingCode; /** * If the country input/selector should be disabled if the country is Mexico * @type {boolean} * @default false */ disableIfMX?: boolean; /** * Title of the input * @type {string} */ inputTitle: string; /** * Question of the input * @type {string} */ inputQuestion?: string; /** * If the default country should be pinned to the top of the list * @type {boolean} * @default true */ pinDefaultCountry?: boolean; /** * A list of countries to pin to the top of the list * @type {CountryCode[]} * @default [defaultCountry] if pinDefaultCountry is true and defaultCountry is defined, otherwise [] */ pinnedCountries?: CountryCode[]; /** * What locale to use for the component (for country names) * @type {AvailableLocales} * @default 'en' */ locale?: AvailableLocales; /** * If the country flags should be shown in the list * @type {boolean} * @default true */ emojiFlags?: boolean; /** * If the country code should be shown in the input * @type {boolean} * @default true */ showCountryCode?: boolean; /** * If the phone number should be shown in the input * @type {boolean} * @default true */ showPhoneNumber?: boolean; /** * Rules to change the country calling code for a specific country * @type {PhoneRules} * @default LS_BUSINESS_PHONE_RULES * @see LS_BUSINESS_PHONE_RULES */ callingCodeRules?: PhoneRules; } export declare const PhoneNumberInput: ({ phoneHandle, setPhoneHandle, countryCode, setCountryCode, countryCallingCode, setCountryCallingCode, errorOnCreation, isRequired, defaultPhoneHandle, defaultCountry, defaultCountryCallingCode, disableIfMX, inputTitle, inputQuestion, pinDefaultCountry, locale, pinnedCountries, emojiFlags, showCountryCode, showPhoneNumber, callingCodeRules, ...props }: PhoneNumberInputProps) => JSX.Element; declare const _default: React.MemoExoticComponent<({ phoneHandle, setPhoneHandle, countryCode, setCountryCode, countryCallingCode, setCountryCallingCode, errorOnCreation, isRequired, defaultPhoneHandle, defaultCountry, defaultCountryCallingCode, disableIfMX, inputTitle, inputQuestion, pinDefaultCountry, locale, pinnedCountries, emojiFlags, showCountryCode, showPhoneNumber, callingCodeRules, ...props }: PhoneNumberInputProps) => JSX.Element>; export default _default;