import React from "react"; import { CountryCallingCode, CountryCode, E164Number } from "libphonenumber-js"; export interface PhoneInputProps extends Partial> { /** * Phone handle value * * Will be 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 code is selected or 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} */ callingCode: CountryCallingCode | undefined; /** * Country calling code setter * @param {CountryCallingCode | undefined} value * @return {void} */ setCallingCode: (value: CountryCallingCode | undefined) => void; /** * 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; /** * Default phone handle * @type {E164Number} */ defaultPhoneHandle?: E164Number; /** * Default country to initialize the component with * @type {CountryCode} */ defaultCountryCode?: CountryCode; /** * Default country calling code to initialize the component with * @type {CountryCallingCode} */ defaultCountryCallingCode?: CountryCallingCode; /** * If the country code should be editable in the input * @type {boolean} * @default true */ countryCodeEditable?: boolean; /** * If there was an error external to the component, this will show an error message * @type {boolean} */ errorOnCreation?: boolean; /** * Set the external error state * @param {boolean} value * @return {void} */ setErrorOnCreation?: (value: boolean) => void; } export declare const PhoneInput: ({ phoneHandle, setPhoneHandle, countryCode, setCountryCode, callingCode, setCallingCode, showCountryCode, showPhoneNumber, defaultCountryCode, defaultCountryCallingCode, defaultPhoneHandle, countryCodeEditable, errorOnCreation, setErrorOnCreation, }: PhoneInputProps) => JSX.Element; declare const _default: React.MemoExoticComponent<({ phoneHandle, setPhoneHandle, countryCode, setCountryCode, callingCode, setCallingCode, showCountryCode, showPhoneNumber, defaultCountryCode, defaultCountryCallingCode, defaultPhoneHandle, countryCodeEditable, errorOnCreation, setErrorOnCreation, }: PhoneInputProps) => JSX.Element>; export default _default;