import React from 'react'; import { TextFieldProps } from '../TextField'; import type { CountryFlag, PhoneTemplate } from './templates'; export interface PhoneFieldProps extends Omit { /** * Phone string format 79876543210 or +7 (987) 654-32-10 */ readonly value: string; /** * On input change event */ readonly onChange: (event: React.ChangeEvent, payload: PhonePayload) => void; /** * Supported RegExp templates */ readonly templates: readonly PhoneTemplate[]; /** * If truethen CountryFalg component will be hidden */ readonly withoutCountryFlag?: boolean; } export interface PhonePayload { /** * Phone formatted string, e.g.: +7 (987) 654-32-10 */ readonly value: string; /** * Country code (ISO 3166-1 alpha-2), e.g.: RU */ readonly countryCode: string | null; /** * JSX Element of Country Flag */ readonly CountryFlag: CountryFlag | null; /** * Phone template, e.g.: +7 (xxx) xxx-xx-xx. The symbol «x» - is a digit */ readonly template: string; /** * Phone placeholder, e.g.: +7 (999) 999-99-99 */ readonly placeholder: string; /** * Country calling code, e.g.: 7 */ readonly callingCode: string | null; /** * Phone number without calling code and formatters */ readonly number: string; /** * Phone number with calling code */ readonly combined: string; /** * Phone validation status */ readonly isValid: boolean; } declare const _default: React.ForwardRefExoticComponent>; export default _default; export * from './usePhoneUtils'; export * from './templates';